sxtwl_cpp icon indicating copy to clipboard operation
sxtwl_cpp copied to clipboard

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

Open OwenChen0911 opened this issue 2 years ago • 0 comments

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

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'

OwenChen0911 avatar Mar 20 '22 15:03 OwenChen0911