Skip to content

Commit

Permalink
BUG: Fix build/tests with numpy 1.24
Browse files Browse the repository at this point in the history
Closes pydata#423
  • Loading branch information
nileshpatra committed Jan 19, 2023
1 parent a825e20 commit d837bd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bottleneck/slow/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ def lastrank(a, axis=-1):
# At least one dimension has length 0
shape = list(a.shape)
shape.pop(axis)
r = np.empty(shape, dtype=a.dtype)
r = np.empty(shape, dtype=float)
r.fill(np.nan)
r = r.astype(a.dtype)
if (r.ndim == 0) and (r.size == 1):
r = np.nan
return r
Expand Down

0 comments on commit d837bd5

Please sign in to comment.