Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

請問該庫怎麼用numpy向量化呢? #34

Open
OwenChen0911 opened this issue Mar 20, 2022 · 0 comments
Open

請問該庫怎麼用numpy向量化呢? #34

OwenChen0911 opened this issue Mar 20, 2022 · 0 comments

Comments

@OwenChen0911
Copy link

我有大量的日期要轉換天干地支

lunar = sxtwl.Lunar()
vfunc = np.vectorize(lunar.getDayBySolar)
day = vfunc(date_df.year, date_df.month, date_df.day)

試著想將其向量化,但不知正確用法

會出現這樣錯誤

TypeError: in method 'Lunar_getDayBySolar', argument 2 of type 'int'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant