Skip to content

Commit 9247ba9

Browse files
AdasjoVictorOstermanLindefor
committed
test that take can handle when indexer is None
Co-authored-by: Victor Österman <[email protected]> Co-authored-by: Lindefor <[email protected]>
1 parent ff5d56f commit 9247ba9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/test_take.py

+6
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ def test_take_non_hashable_fill_value(self):
250250
expected = np.array([2, [1]], dtype=object)
251251
tm.assert_numpy_array_equal(result, expected)
252252

253+
def test_take_indices_is_None(self):
254+
arr = np.array([1, 2, 3])
255+
indexer = None
256+
result = algos.take(arr, indexer)
257+
tm.assert_numpy_array_equal(result, arr)
258+
253259

254260
class TestExtensionTake:
255261
# The take method found in pd.api.extensions

0 commit comments

Comments
 (0)