Skip to content

Commit a9d80c5

Browse files
committed
Suppress nan->nan warning
1 parent 8e888a8 commit a9d80c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_decode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,9 @@ def test_consistent_decodes_all_values(
261261
np.iinfo(int_dtype).min, int(np.iinfo(int_dtype).max) + 1, dtype=int_dtype
262262
)
263263

264-
# Warning here when converting bfloat16 NaNs to float64
265-
npfvals = npivals.view(dtype=npfmt).astype(np.float64)
264+
with np.errstate(invalid="ignore"):
265+
# Warning here when converting bfloat16 NaNs to float64
266+
npfvals = npivals.view(dtype=npfmt).astype(np.float64)
266267

267268
# Scalar version
268269
for i, npfval in zip(npivals, npfvals):

0 commit comments

Comments
 (0)