Skip to content

Commit

Permalink
Pass an array
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Apr 25, 2018
1 parent bbcbf19 commit 1a4d987
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,7 @@ def test_take_empty(self, allow_fill):
algos.take(arr, [0], allow_fill=allow_fill)

def test_take_na_empty(self):
result = algos.take([], [-1, -1], allow_fill=True, fill_value=0)
expected = np.array([0, 0], dtype=np.int64)
result = algos.take(np.array([]), [-1, -1], allow_fill=True,
fill_value=0.0)
expected = np.array([0., 0.])
tm.assert_numpy_array_equal(result, expected)

0 comments on commit 1a4d987

Please sign in to comment.