Skip to content

Commit a3a2b97

Browse files
Apply suggestions from code review part II
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
1 parent 9dfc0dd commit a3a2b97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Convert/numpy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function pydatetime64(@nospecialize(x::T)) where T <: Period
3838
T <: Union{Week, Day, Hour, Minute, Second, Millisecond, Microsecond} ||
3939
error("Unsupported Period type: `$x::$T`. Consider using pytimedelta64 instead.")
4040
args = map(Base.Fix1(isa, x), (Day, Second, Millisecond, Microsecond, Minute, Hour, Week))
41-
pydatetime64(x.value .* args...)
41+
pydatetime64(map(Base.Fix1(*, x.value), args)...)
4242
end
4343
function pydatetime64(x::CompoundPeriod)
4444
x = canonicalize(x)

0 commit comments

Comments
 (0)