Skip to content

Commit

Permalink
correcting mistake of adding subok keyword to broadcast shapes instea…
Browse files Browse the repository at this point in the history
…d of broadcast_to
  • Loading branch information
jacobdparker committed May 24, 2024
1 parent b454d27 commit dc3b6f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regridding/_regrid/_regrid_from_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ def regrid_from_weights(
:func:`regridding.regrid_from_weights`
"""

shape_input = np.broadcast_shapes(values_input.shape, shape_input, subok=True)
shape_input = np.broadcast_shapes(values_input.shape, shape_input)

ndim_input = len(shape_input)
axis_input = _util._normalize_axis(axis_input, ndim=ndim_input)

shape_orthogonal = (
1 if i in axis_input else shape_input[i] for i in range(-len(shape_input), 0)
)
weights = np.broadcast_to(np.array(weights), shape_orthogonal)
values_input = np.broadcast_to(values_input, shape_input)
weights = np.broadcast_to(np.array(weights), shape_orthogonal, subok=True)
values_input = np.broadcast_to(values_input, shape_input, subok=True)

if values_output is None:
shape_output = np.broadcast_shapes(
Expand Down

0 comments on commit dc3b6f0

Please sign in to comment.