Skip to content

Commit cd649a2

Browse files
authored
TST: fix xfailing indexing test (pandas-dev#37562)
1 parent 6092dc7 commit cd649a2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pandas/core/indexing.py

+3
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,9 @@ def _setitem_with_indexer_split_path(self, indexer, value):
17101710
self._setitem_single_column(loc, v, plane_indexer)
17111711
else:
17121712

1713+
if isinstance(indexer[0], np.ndarray) and indexer[0].ndim > 2:
1714+
raise ValueError(r"Cannot set values with ndim > 2")
1715+
17131716
# scalar value
17141717
for loc in ilocs:
17151718
self._setitem_single_column(loc, value, plane_indexer)

pandas/tests/indexing/test_indexing.py

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def test_setitem_ndarray_3d(self, index, obj, idxr, idxr_id):
139139
with pytest.raises(err, match=msg):
140140
idxr[nd3] = 0
141141

142-
@pytest.mark.xfail(reason="gh-32896")
143142
def test_setitem_ndarray_3d_does_not_fail_for_iloc_empty_dataframe(self):
144143
# when fixing this, please remove the pytest.skip in test_setitem_ndarray_3d
145144
i = Index([])

0 commit comments

Comments
 (0)