MAINT: Fix failures/warnings in test_api_shim.py

- Fixes a warning on indexing with a float that ultimately came from
  pd.Timedelta.total_seconds().  Adds ``timedelta_to_integral_seconds``
  and ``timedelta_to_integral_minutes()`` functions and replaces various
  usages of ``int(delta.total_seconds())`` with them.

- Fixes a warnings triggered in ``_create_daily_stats`` from
  passing tz-aware datetimes to np.datetime64.
This commit is contained in:
Scott Sanderson
2016-09-20 17:12:07 -04:00
parent ccc31152a5
commit becf897da9
6 changed files with 73 additions and 34 deletions
+1
View File
@@ -18,6 +18,7 @@ from numpy import (
flatnonzero,
hstack,
nan,
timedelta64,
vectorize,
where
)