diff options
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |