From db62c35f9f9e9b3fe3d8c6463cab34967024dbf2 Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Fri, 10 Jun 2011 17:09:39 -0500 Subject: 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. --- numpy/core/arrayprint.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'numpy/core/arrayprint.py') 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') -- cgit v1.2.1