Skip to content

Commit

Permalink
Remove unused imports (#17745)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and jreback committed Oct 3, 2017
1 parent 8e89cb3 commit 9e67f43
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
6 changes: 0 additions & 6 deletions pandas/_libs/hashtable.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ cnp.import_ufunc()
cdef int64_t iNaT = util.get_nat()
_SIZE_HINT_LIMIT = (1 << 20) + 7

cdef extern from "datetime.h":
bint PyDateTime_Check(object o)
void PyDateTime_IMPORT()

PyDateTime_IMPORT


cdef size_t _INIT_VEC_CAP = 128

Expand Down
6 changes: 1 addition & 5 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ cdef double NAN = nan
# this is our tseries.pxd
from datetime cimport (
get_timedelta64_value, get_datetime64_value,
npy_timedelta, npy_datetime,
PyDateTime_Check, PyDate_Check, PyTime_Check, PyDelta_Check,
PyDateTime_IMPORT)

Expand All @@ -62,11 +61,8 @@ from interval import Interval

cdef int64_t NPY_NAT = util.get_nat()

ctypedef unsigned char UChar

cimport util
from util cimport (is_array, _checknull, _checknan, INT64_MAX,
INT64_MIN, UINT8_MAX)
from util cimport is_array, _checknull, _checknan

cdef extern from "math.h":
double sqrt(double x)
Expand Down
12 changes: 3 additions & 9 deletions pandas/_libs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ from cpython cimport (
PyObject_RichCompareBool,
Py_EQ, Py_NE)

from numpy cimport (int8_t, int32_t, int64_t, import_array, ndarray,
NPY_INT64, NPY_DATETIME, NPY_TIMEDELTA)
from numpy cimport int64_t, import_array, ndarray
import numpy as np
import_array()

Expand All @@ -23,12 +22,11 @@ from datetime cimport (
pandas_datetimestruct,
pandas_datetimestruct_to_datetime,
pandas_datetime_to_datetimestruct,
PANDAS_FR_ns,
INT32_MIN)
PANDAS_FR_ns)


cimport util
from util cimport is_period_object, is_string_object
from util cimport is_period_object, is_string_object, INT32_MIN

from lib cimport is_null_datetimelike
from pandas._libs import tslib
Expand Down Expand Up @@ -90,12 +88,8 @@ cdef extern from "period_helper.h":
int microseconds, int picoseconds,
int freq) nogil except INT32_MIN

int64_t get_python_ordinal(int64_t period_ordinal,
int freq) except INT32_MIN

int get_date_info(int64_t ordinal, int freq,
date_info *dinfo) nogil except INT32_MIN
double getAbsTime(int, int64_t, int64_t)

int pyear(int64_t ordinal, int freq) except INT32_MIN
int pqyear(int64_t ordinal, int freq) except INT32_MIN
Expand Down
8 changes: 0 additions & 8 deletions pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ from cpython cimport (
cdef extern from "Python.h":
cdef PyTypeObject *Py_TYPE(object)

# this is our datetime.pxd
from libc.stdlib cimport free

from util cimport (is_integer_object, is_float_object, is_datetime64_object,
Expand Down Expand Up @@ -65,11 +64,8 @@ from .tslibs.parsing import parse_datetime_string

cimport cython

import time

from pandas.compat import iteritems, callable

import operator
import collections
import warnings

Expand Down Expand Up @@ -933,10 +929,6 @@ cdef int64_t _NS_UPPER_BOUND = INT64_MAX
# use the smallest value with a 0 nanosecond unit (0s in last 3 digits)
cdef int64_t _NS_LOWER_BOUND = -9223372036854775000

cdef pandas_datetimestruct _NS_MIN_DTS, _NS_MAX_DTS
pandas_datetime_to_datetimestruct(_NS_LOWER_BOUND, PANDAS_FR_ns, &_NS_MIN_DTS)
pandas_datetime_to_datetimestruct(_NS_UPPER_BOUND, PANDAS_FR_ns, &_NS_MAX_DTS)

# Resolution is in nanoseconds
Timestamp.min = Timestamp(_NS_LOWER_BOUND)
Timestamp.max = Timestamp(_NS_UPPER_BOUND)
Expand Down

0 comments on commit 9e67f43

Please sign in to comment.