summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2009-08-27 22:29:39 +0000
committerTravis Oliphant <oliphant@enthought.com>2009-08-27 22:29:39 +0000
commit5bebcdfd6cda1d015f52e213bf94cfdc5b0b8b98 (patch)
treebb93e3f2c717520df69e45de884a9a11acafc902 /numpy/core/arrayprint.py
parent663b056c495fa51947bbb7e918b35dd271cf42bc (diff)
downloadnumpy-5bebcdfd6cda1d015f52e213bf94cfdc5b0b8b98.tar.gz
Code compiles and some of it seems to work...
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index a3edb64d4..6d3c52990 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -188,10 +188,13 @@ def _array2string(a, max_line_width, precision, suppress_small, separator=' ',
# make sure True and False line up.
format_function = _boolFormatter
elif issubclass(dtypeobj, _nt.integer):
- max_str_len = max(len(str(maximum.reduce(data))),
- len(str(minimum.reduce(data))))
- format = '%' + str(max_str_len) + 'd'
- format_function = lambda x: _formatInteger(x, format)
+ if issubclass(dtypeobj, _nt.timeinteger):
+ format_function = str
+ else:
+ max_str_len = max(len(str(maximum.reduce(data))),
+ len(str(minimum.reduce(data))))
+ format = '%' + str(max_str_len) + 'd'
+ format_function = lambda x: _formatInteger(x, format)
elif issubclass(dtypeobj, _nt.floating):
if issubclass(dtypeobj, _nt.longfloat):
format_function = _longfloatFormatter(precision)