Skip to content

Commit

Permalink
TST: 32bit dtype compat #36579 (#36584)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli authored Sep 24, 2020
1 parent 6648439 commit 31788da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pandas/tests/indexes/period/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def test_get_indexer_non_unique(self):

result = idx1.get_indexer_non_unique(idx2)
expected_indexer = np.array([1, 0, 2, -1, -1], dtype=np.intp)
expected_missing = np.array([2, 3], dtype=np.int64)
expected_missing = np.array([2, 3], dtype=np.intp)

tm.assert_numpy_array_equal(result[0], expected_indexer)
tm.assert_numpy_array_equal(result[1], expected_missing)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,7 @@ def construct(dtype):
ex1 = np.array([0, 3, 1, 4, 2, 5] * 2, dtype=np.intp)
ex2 = np.array([], dtype=np.intp)
tm.assert_numpy_array_equal(result[0], ex1)
tm.assert_numpy_array_equal(result[1], ex2.astype(np.int64))
tm.assert_numpy_array_equal(result[1], ex2)

else:
no_matches = np.array([-1] * 6, dtype=np.intp)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ def test_lookup_nan(self, writable):
xs.setflags(write=writable)
m = ht.Float64HashTable()
m.map_locations(xs)
tm.assert_numpy_array_equal(m.lookup(xs), np.arange(len(xs), dtype=np.int64))
tm.assert_numpy_array_equal(m.lookup(xs), np.arange(len(xs), dtype=np.intp))

def test_add_signed_zeros(self):
# GH 21866 inconsistent hash-function for float64
Expand Down Expand Up @@ -1578,7 +1578,7 @@ def test_lookup_overflow(self, writable):
xs.setflags(write=writable)
m = ht.UInt64HashTable()
m.map_locations(xs)
tm.assert_numpy_array_equal(m.lookup(xs), np.arange(len(xs), dtype=np.int64))
tm.assert_numpy_array_equal(m.lookup(xs), np.arange(len(xs), dtype=np.intp))

def test_get_unique(self):
s = Series([1, 2, 2 ** 63, 2 ** 63], dtype=np.uint64)
Expand Down

0 comments on commit 31788da

Please sign in to comment.