Skip to content

Commit aa2398f

Browse files
committed
Checked pyx-code for old numpy
1 parent 2dc0eeb commit aa2398f

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,6 @@ class RoundTo(object):
129129
return 4
130130

131131

132-
cdef inline _npdivmod(x1, x2):
133-
"""implement divmod for numpy < 1.13"""
134-
return np.floor_divide(x1, x2), np.remainder(x1, x2)
135-
136-
137-
try:
138-
from numpy import divmod as npdivmod
139-
except ImportError:
140-
# numpy < 1.13
141-
npdivmod = _npdivmod
142-
143-
144132
cdef inline _floor_int64(values, unit):
145133
return values - np.remainder(values, unit)
146134

@@ -183,7 +171,7 @@ def round_nsint64(values, mode, freq):
183171
# for odd unit there is no need of a tie break
184172
if unit % 2:
185173
return _rounddown_int64(values, unit)
186-
quotient, remainder = npdivmod(values, unit)
174+
quotient, remainder = np.divmod(values, unit)
187175
mask = np.logical_or(
188176
remainder > (unit // 2),
189177
np.logical_and(remainder == (unit // 2), quotient % 2)

0 commit comments

Comments
 (0)