Skip to content

Commit d5f30fa

Browse files
jbrockmendeljreback
authored andcommitted
remove unused np version check (#22530)
1 parent 95bc7d1 commit d5f30fa

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

pandas/_libs/reduction.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ cnp.import_array()
1818
cimport util
1919
from lib import maybe_convert_objects
2020

21-
is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2'
22-
2321

2422
cdef _get_result_array(object obj, Py_ssize_t size, Py_ssize_t cnt):
2523

pandas/_libs/tslib.pyx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ from tslibs.nattype cimport checknull_with_nat, NPY_NAT
4646

4747
from tslibs.offsets cimport to_offset
4848

49-
from tslibs.timestamps cimport (create_timestamp_from_ts,
50-
_NS_UPPER_BOUND, _NS_LOWER_BOUND)
49+
from tslibs.timestamps cimport create_timestamp_from_ts
5150
from tslibs.timestamps import Timestamp
5251

5352

@@ -350,8 +349,8 @@ cpdef array_with_unit_to_datetime(ndarray values, unit, errors='coerce'):
350349
# check the bounds
351350
if not need_to_iterate:
352351

353-
if ((fvalues < _NS_LOWER_BOUND).any()
354-
or (fvalues > _NS_UPPER_BOUND).any()):
352+
if ((fvalues < Timestamp.min.value).any()
353+
or (fvalues > Timestamp.max.value).any()):
355354
raise OutOfBoundsDatetime("cannot convert input with unit "
356355
"'{unit}'".format(unit=unit))
357356
result = (iresult * m).astype('M8[ns]')

pandas/_libs/tslibs/timestamps.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ from np_datetime cimport npy_datetimestruct
66
cdef object create_timestamp_from_ts(int64_t value,
77
npy_datetimestruct dts,
88
object tz, object freq)
9-
10-
cdef int64_t _NS_UPPER_BOUND, _NS_LOWER_BOUND

0 commit comments

Comments
 (0)