From 47a12f148cd481af89a199f33ba3106a21dc53ae Mon Sep 17 00:00:00 2001 From: Allan Haldane Date: Fri, 17 Nov 2017 21:48:38 -0500 Subject: MAINT: add back in errstate ignore in FloatingFormat --- numpy/core/arrayprint.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'numpy/core/arrayprint.py') diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index 0030e0ef1..9174328bf 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -721,9 +721,10 @@ class FloatingFormat(object): if len(abs_non_zero) != 0: max_val = np.max(abs_non_zero) min_val = np.min(abs_non_zero) - if max_val >= 1.e8 or (not self.suppress_small and - (min_val < 0.0001 or max_val/min_val > 1000.)): - self.exp_format = True + with errstate(over='ignore'): # division can overflow + if max_val >= 1.e8 or (not self.suppress_small and + (min_val < 0.0001 or max_val/min_val > 1000.)): + self.exp_format = True # do a first pass of printing all the numbers, to determine sizes if len(finite_vals) == 0: -- cgit v1.2.1