diff options
author | Mark Wiebe <mwiebe@enthought.com> | 2011-06-10 17:09:39 -0500 |
---|---|---|
committer | Mark Wiebe <mwiebe@enthought.com> | 2011-06-10 17:09:39 -0500 |
commit | db62c35f9f9e9b3fe3d8c6463cab34967024dbf2 (patch) | |
tree | 8d8a027fffa1c4a5fa845fe548eb120172bd6bc5 /numpy/core/arrayprint.py | |
parent | 8a8a84a89fe45187bbfb284f3a0ebdbd52396d41 (diff) | |
download | numpy-db62c35f9f9e9b3fe3d8c6463cab34967024dbf2.tar.gz |
ENH: datetime-autounit: Unit detection working with arrays, fix ufunc reductions
The default NPY_DATETIME type was still in microseconds, because it
wasn't using the NPY_DATETIME_DEFAULTUNIT macro as it should have been.
The reduction functions in ufuncs didn't respect the metadata appropriately.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index 8595d6f02..556d4da04 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -718,8 +718,5 @@ class TimedeltaFormat(object): self.format = '%' + str(max_str_len) + 'd' def __call__(self, x): - if _MININT < x < _MAXINT: - return self.format % x.astype('i8') - else: - return "%s" % x + return self.format % x.astype('i8') |