summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_datetime.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/tests/test_datetime.py b/numpy/core/tests/test_datetime.py
index 369bb3dfd..02131fa3d 100644
--- a/numpy/core/tests/test_datetime.py
+++ b/numpy/core/tests/test_datetime.py
@@ -59,7 +59,7 @@ class TestDateTime(TestCase):
def test_creation_overflow(self):
date = '1980-03-23 20:00:00'
- timesteps = np.array([date], dtype='datetime64[s]')[0].astype(int)
+ timesteps = np.array([date], dtype='datetime64[s]')[0].astype(np.int64)
for unit in ['ms', 'us', 'ns']:
timesteps *= 1000
x = np.array([date], dtype='datetime64[%s]' % unit)
@@ -67,7 +67,7 @@ class TestDateTime(TestCase):
assert_equal(timesteps, x[0].astype(np.int64),
err_msg='Datetime conversion error for unit %s' % unit)
- assert_equal(x[0].astype(int), 322689600000000000)
+ assert_equal(x[0].astype(np.int64), 322689600000000000)
if __name__ == "__main__":
run_module_suite()