Skip to content

Commit

Permalink
Apply suggestions from code review part II
Browse files Browse the repository at this point in the history
Co-authored-by: Miles Cranmer <[email protected]>
  • Loading branch information
hhaensel and MilesCranmer authored Sep 6, 2024
1 parent 9dfc0dd commit a3a2b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Convert/numpy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function pydatetime64(@nospecialize(x::T)) where T <: Period
T <: Union{Week, Day, Hour, Minute, Second, Millisecond, Microsecond} ||
error("Unsupported Period type: `$x::$T`. Consider using pytimedelta64 instead.")
args = map(Base.Fix1(isa, x), (Day, Second, Millisecond, Microsecond, Minute, Hour, Week))
pydatetime64(x.value .* args...)
pydatetime64(map(Base.Fix1(*, x.value), args)...)
end
function pydatetime64(x::CompoundPeriod)
x = canonicalize(x)
Expand Down

0 comments on commit a3a2b97

Please sign in to comment.