Skip to content

Commit 7839406

Browse files
Backport PR #53774 on branch 2.0.x (COMPAT: Remove np.compat) (#53776)
Backport PR #53774: COMPAT: Remove np.compat Co-authored-by: Matthew Roeschke <[email protected]>
1 parent af7d5d8 commit 7839406

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/libs/test_hashtable.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def test_get_labels_groupby_for_Int64(writable):
461461

462462
def test_tracemalloc_works_for_StringHashTable():
463463
N = 1000
464-
keys = np.arange(N).astype(np.compat.unicode).astype(np.object_)
464+
keys = np.arange(N).astype(np.str_).astype(np.object_)
465465
with activated_tracemalloc():
466466
table = ht.StringHashTable()
467467
table.map_locations(keys)
@@ -484,7 +484,7 @@ def test_tracemalloc_for_empty_StringHashTable():
484484

485485
@pytest.mark.parametrize("N", range(1, 110))
486486
def test_no_reallocation_StringHashTable(N):
487-
keys = np.arange(N).astype(np.compat.unicode).astype(np.object_)
487+
keys = np.arange(N).astype(np.str_).astype(np.object_)
488488
preallocated_table = ht.StringHashTable(N)
489489
n_buckets_start = preallocated_table.get_state()["n_buckets"]
490490
preallocated_table.map_locations(keys)

0 commit comments

Comments
 (0)