Skip to content

Commit e4aaf68

Browse files
committed
Revert "Ignore possible RuntimeWarning in _hash_ndarray"
This reverts commit 1c9a763.
1 parent 1c9a763 commit e4aaf68

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

pandas/core/util/hashing.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import itertools
88
from typing import TYPE_CHECKING
9-
import warnings
109

1110
import numpy as np
1211

@@ -335,15 +334,9 @@ def _hash_ndarray(
335334
vals = hash_object_array(vals, hash_key, encoding)
336335
except TypeError:
337336
# we have mixed types
338-
with warnings.catch_warnings():
339-
warnings.filterwarnings(
340-
"ignore",
341-
"invalid value encountered in cast",
342-
RuntimeWarning,
343-
)
344-
vals = hash_object_array(
345-
vals.astype(str).astype(object), hash_key, encoding
346-
)
337+
vals = hash_object_array(
338+
vals.astype(str).astype(object), hash_key, encoding
339+
)
347340

348341
# Then, redistribute these 64-bit ints within the space of 64-bit ints
349342
vals ^= vals >> 30

0 commit comments

Comments
 (0)