We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13e2df0 commit 1c9a763Copy full SHA for 1c9a763
pandas/core/util/hashing.py
@@ -6,6 +6,7 @@
6
7
import itertools
8
from typing import TYPE_CHECKING
9
+import warnings
10
11
import numpy as np
12
@@ -334,9 +335,15 @@ def _hash_ndarray(
334
335
vals = hash_object_array(vals, hash_key, encoding)
336
except TypeError:
337
# we have mixed types
- vals = hash_object_array(
338
- vals.astype(str).astype(object), hash_key, encoding
339
- )
+ with warnings.catch_warnings():
+ 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
347
348
# Then, redistribute these 64-bit ints within the space of 64-bit ints
349
vals ^= vals >> 30
0 commit comments