summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-05-09 12:19:06 +0000
committerPauli Virtanen <pav@iki.fi>2010-05-09 12:19:06 +0000
commit4864c3d460db80ac1e49768df4bf3246b011e862 (patch)
tree993b0d579135383311a8c4a96d242bbc9079890e /numpy
parentcdfd96a091e004a53a3aba2be55309ddf67e2b7a (diff)
downloadnumpy-4864c3d460db80ac1e49768df4bf3246b011e862.tar.gz
BUG: core: fix a datetime test case (fixes #1468)
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()