From 74057dee709fe3e48d24f5afabd3ffb5ffc72888 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Tue, 22 May 2007 23:12:03 +0000 Subject: Fix ticket #501 which caused some array printing problems --- numpy/core/arrayprint.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/core/arrayprint.py') diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index ea91a0a86..d47180e4f 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -344,6 +344,7 @@ def _formatArray(a, format_function, rank, max_line_len, 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 @@ def _floatFormat(data, precision, suppress_small, sign = 0): 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 -- cgit v1.2.1