diff options
author | Mark Wiebe <mwiebe@enthought.com> | 2011-06-03 12:20:52 -0500 |
---|---|---|
committer | Mark Wiebe <mwiebe@enthought.com> | 2011-06-03 12:20:52 -0500 |
commit | de719936cf64df1a8f1096fb7f3a2be720906da4 (patch) | |
tree | d0106c1e1e4e5a7483747c36fbc0e00314153573 /numpy/core/tests | |
parent | 681adf030eda8e9097cf53856dda6426b2351485 (diff) | |
download | numpy-de719936cf64df1a8f1096fb7f3a2be720906da4.tar.gz |
ENH: datetime: Remove TimeInteger, partially fix up datetime array printing
The TimeInteger seemed like the wrong abstraction to me. Timedelta
is reasonable as an integer, and in fact if NumPy supported arbitrary
unit metadata, Timedelta could be removed and that mechanism used
instead. Datetime, however, doesn't represent an integer. Datetime
has no zero (barring big bang, God's creation, or some other choice...),
something which integers definitely have.
Diffstat (limited to 'numpy/core/tests')
-rw-r--r-- | numpy/core/tests/test_arrayprint.py | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_regression.py | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py index dd86fcbd9..b1dbb1d68 100644 --- a/numpy/core/tests/test_arrayprint.py +++ b/numpy/core/tests/test_arrayprint.py @@ -80,8 +80,6 @@ class TestArray2String(TestCase): "[. o O]") assert_(np.array2string(x, formatter={'int_kind':_format_function}) ==\ "[. o O]") - assert_(np.array2string(x, formatter={'timeint':_format_function}) == \ - "[0 1 2]") assert_(np.array2string(x, formatter={'all':lambda x: "%.4f" % x}) == \ "[0.0000 1.0000 2.0000]") assert_(np.array2string(x, formatter={'int':lambda x: hex(x)}) == \ diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py index 5264ff31e..ad043ea8a 100644 --- a/numpy/core/tests/test_regression.py +++ b/numpy/core/tests/test_regression.py @@ -1317,7 +1317,7 @@ class TestRegression(TestCase): def test_ticket_1539(self): dtypes = [x for x in np.typeDict.values() if (issubclass(x, np.number) - and not issubclass(x, np.timeinteger))] + and not issubclass(x, np.timedelta_))] a = np.array([], dtypes[0]) failures = [] for x in dtypes: |