Skip to content

Commit f897600

Browse files
committed
fix week kw in pytimedelta64, typo (space) in builtins
1 parent 5740b59 commit f897600

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Convert/numpy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function pytimedelta64(
5151
year::Int=_year, month::Int=_month, day::Int=_day, hour::Int=_hour, minute::Int=_minute, second::Int=_second, microsecond::Int=_microsecond, millisecond::Int=_millisecond, nanosecond::Int=_nanosecond, week::Int=_week)
5252
pytimedelta64(sum((
5353
Year(year), Month(month), # you cannot mix year or month with any of the below units in python, the error will be thrown by `pytimedelta64(::CompoundPeriod)`
54-
Day(day), Hour(hour), Minute(minute), Second(second), Millisecond(millisecond), Microsecond(microsecond), Nanosecond(nanosecond))
54+
Day(day), Hour(hour), Minute(minute), Second(second), Millisecond(millisecond), Microsecond(microsecond), Nanosecond(nanosecond), Week(week))
5555
))
5656
end
5757
function pytimedelta64(@nospecialize(x::T)) where T <: Period

src/Core/builtins.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ end
10741074
function pytimedelta(@nospecialize(x::T)) where T <: Period
10751075
T <: Union{Week, Day, Hour, Minute, Second, Millisecond, Microsecond} ||
10761076
error("Unsupported Period type: ", "Year, Month and Nanosecond are not supported, consider using pytimedelta64 instead.")
1077-
args = T .== (Day, Second, Millisecond, Microsecond, Minute, Hour, Week)
1077+
args = T .== (Day, Second, Millisecond, Microsecond, Minute, Hour, Week)
10781078
pytimedelta(x.value .* args...)
10791079
end
10801080
function pytimedelta(x::CompoundPeriod)

0 commit comments

Comments
 (0)