Skip to content

Commit f542d12

Browse files
committed
Use int64 numpy array
1 parent 4e929c5 commit f542d12

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

pandas/tests/frame/indexing/test_indexing.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,9 @@ def test_setitem_list_of_tuples(self, float_frame):
223223
),
224224
(
225225
["A", "B", "C"],
226-
np.array([7, 8, 9]),
226+
np.array([7, 8, 9], dtype=np.int64),
227227
pd.DataFrame(
228-
[[7, 8, 9], [7, 8, 9], [7, 8, 9]],
229-
columns=["A", "B", "C"],
228+
[[7, 8, 9], [7, 8, 9], [7, 8, 9]], columns=["A", "B", "C"]
230229
),
231230
),
232231
(
@@ -239,7 +238,7 @@ def test_setitem_list_of_tuples(self, float_frame):
239238
),
240239
(
241240
["C", "A", "D"],
242-
np.array([[7, 8, 9], [10, 11, 12], [13, 14, 15]]),
241+
np.array([[7, 8, 9], [10, 11, 12], [13, 14, 15]], dtype=np.int64),
243242
pd.DataFrame(
244243
[[8, 2, 7, 9], [11, 4, 10, 12], [14, 6, 13, 15]],
245244
columns=["A", "B", "C", "D"],

pandas/tests/indexing/test_loc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def test_loc_setitem_with_scalar_index(self, indexer, value):
771771
),
772772
(
773773
(1, ["A", "B", "C"]),
774-
np.array([7, 8, 9]),
774+
np.array([7, 8, 9], dtype=np.int64),
775775
pd.DataFrame(
776776
[[1, 2, np.nan], [7, 8, 9], [5, 6, np.nan]],
777777
columns=["A", "B", "C"],
@@ -787,7 +787,7 @@ def test_loc_setitem_with_scalar_index(self, indexer, value):
787787
),
788788
(
789789
(slice(1, 3, None), ["C", "A", "D"]),
790-
np.array([[7, 8, 9], [10, 11, 12]]),
790+
np.array([[7, 8, 9], [10, 11, 12]], dtype=np.int64),
791791
pd.DataFrame(
792792
[[1, 2, np.nan, np.nan], [8, 4, 7, 9], [11, 6, 10, 12]],
793793
columns=["A", "B", "C", "D"],

0 commit comments

Comments
 (0)