Skip to content

Commit 0e1ea81

Browse files
committed
BUG: A few more stragglers.
1 parent 863ac93 commit 0e1ea81

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pandas/core/nanops.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ def nankurt(values, axis=None, skipna=True):
582582
if denom == 0:
583583
return 0
584584

585-
result = numer / denom - adj
585+
with np.errstate(invalid='ignore', divide='ignore'):
586+
result = numer / denom - adj
586587

587588
dtype = values.dtype
588589
if is_float_dtype(dtype):

pandas/tests/indexes/common.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ def test_numpy_ufuncs(self):
709709
# raise TypeError or ValueError (PeriodIndex)
710710
# PeriodIndex behavior should be changed in future version
711711
with tm.assertRaises(Exception):
712-
func(idx)
712+
with np.errstate(all='ignore'):
713+
func(idx)
713714
elif isinstance(idx, (Float64Index, Int64Index)):
714715
# coerces to float (e.g. np.sin)
715716
with np.errstate(all='ignore'):
@@ -723,7 +724,8 @@ def test_numpy_ufuncs(self):
723724
continue
724725
else:
725726
with tm.assertRaises(Exception):
726-
func(idx)
727+
with np.errstate(all='ignore'):
728+
func(idx)
727729

728730
for func in [np.isfinite, np.isinf, np.isnan, np.signbit]:
729731
if isinstance(idx, pd.tseries.base.DatetimeIndexOpsMixin):

0 commit comments

Comments
 (0)