Skip to content

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

Description

@OwenChen0911

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

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions