Skip to content

CLN: remove unused np version check #22530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pandas/_libs/reduction.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ cnp.import_array()
cimport util
from lib import maybe_convert_objects

is_numpy_prior_1_6_2 = LooseVersion(np.__version__) < '1.6.2'


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

Expand Down
7 changes: 3 additions & 4 deletions pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ from tslibs.nattype cimport checknull_with_nat, NPY_NAT

from tslibs.offsets cimport to_offset

from tslibs.timestamps cimport (create_timestamp_from_ts,
_NS_UPPER_BOUND, _NS_LOWER_BOUND)
from tslibs.timestamps cimport create_timestamp_from_ts
from tslibs.timestamps import Timestamp


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

if ((fvalues < _NS_LOWER_BOUND).any()
or (fvalues > _NS_UPPER_BOUND).any()):
if ((fvalues < Timestamp.min.value).any()
or (fvalues > Timestamp.max.value).any()):
raise OutOfBoundsDatetime("cannot convert input with unit "
"'{unit}'".format(unit=unit))
result = (iresult * m).astype('M8[ns]')
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/timestamps.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ from np_datetime cimport npy_datetimestruct
cdef object create_timestamp_from_ts(int64_t value,
npy_datetimestruct dts,
object tz, object freq)

cdef int64_t _NS_UPPER_BOUND, _NS_LOWER_BOUND