[Numpy-svn] r3802 - trunk/numpy/core
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue May 22 19:12:05 EDT 2007
Author: oliphant
Date: 2007-05-22 18:12:03 -0500 (Tue, 22 May 2007)
New Revision: 3802
Modified:
trunk/numpy/core/arrayprint.py
Log:
Fix ticket #501 which caused some array printing problems
Modified: trunk/numpy/core/arrayprint.py
===================================================================
--- trunk/numpy/core/arrayprint.py 2007-05-22 22:55:13 UTC (rev 3801)
+++ trunk/numpy/core/arrayprint.py 2007-05-22 23:12:03 UTC (rev 3802)
@@ -344,6 +344,7 @@
def _floatFormat(data, precision, suppress_small, sign = 0):
exp_format = 0
+ errstate = _gen.seterr(all='ignore')
non_zero = _uf.absolute(data.compress(_uf.not_equal(data, 0)))
##non_zero = _numeric_compress(data) ##
if len(non_zero) == 0:
@@ -357,6 +358,7 @@
if not suppress_small and (min_val < 0.0001
or max_val/min_val > 1000.):
exp_format = 1
+ _gen.seterr(**errstate)
if exp_format:
large_exponent = 0 < min_val < 1e-99 or max_val >= 1e100
max_str_len = 8 + precision + large_exponent
More information about the Numpy-svn
mailing list