Skip to content

Commit

Permalink
fix issues with ruff 0.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Aug 9, 2024
1 parent 45824f5 commit 66575a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boxtree/tree_of_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ def _resized_array(arr: np.ndarray, new_size: int) -> np.ndarray:
old_size = arr.shape[-1]
prefix = (slice(None), ) * (arr.ndim - 1)
if old_size >= new_size:
return arr[(*prefix, slice(new_size))].copy()
return arr[*prefix, slice(new_size)].copy()
else:
new_shape = list(arr.shape)
new_shape[-1] = new_size
new_arr = np.zeros(new_shape, arr.dtype)
new_arr[(*prefix, slice(old_size))] = arr
new_arr[*prefix, slice(old_size)] = arr
return new_arr


Expand Down

0 comments on commit 66575a2

Please sign in to comment.