Skip to content

Commit

Permalink
modifying normalized_input_output_coordinates to handle negative axes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdparker committed Jan 17, 2024
1 parent 89dea25 commit f9f31f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions regridding/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ def _normalize_input_output_coordinates(
)

shape_input = list(shape_orthogonal)
for ax in axis_input:
for ax in reversed(axis_input):
ax = ax % ndim_input
shape_input.insert(ax, shape_coordinates_input[ax])
shape_input = tuple(shape_input)

shape_output = list(shape_orthogonal)
for ax in axis_output:
for ax in reversed(axis_output):
ax = ax % ndim_input
shape_output.insert(ax, shape_coordinates_output[ax])
shape_output = tuple(shape_output)

Expand Down

0 comments on commit f9f31f0

Please sign in to comment.