Skip to content

Commit

Permalink
update binary morphology axes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Feb 26, 2025
1 parent 6309b0d commit efa10ae
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def binary_dilation(
"""
axes = _util._check_axes(axes, input.ndim)
structure, structure_shape, symmetric = _prep_structure(
structure, input.ndim
structure, len(axes)
)
axes = _util._check_axes(axes, input.ndim)
origin = _util._fix_sequence_arg(origin, len(axes), "origin", int)
Expand Down Expand Up @@ -728,12 +728,12 @@ def binary_hit_or_miss(
.. seealso:: :func:`scipy.ndimage.binary_hit_or_miss`
"""
axes = _util._check_axes(axes, input.ndim)
num_axes = len(axes)
if structure1 is None:
structure1 = generate_binary_structure(input.ndim, 1)
structure1 = generate_binary_structure(num_axes, 1)
if structure2 is None:
structure2 = cupy.logical_not(structure1)
axes = _util._check_axes(axes, input.ndim)
num_axes = len(axes)
origin1 = _util._fix_sequence_arg(origin1, num_axes, "origin1", int)
if origin2 is None:
origin2 = origin1
Expand Down

0 comments on commit efa10ae

Please sign in to comment.