You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of Anisotropic Diffusion gives two FutureWarnings (from numpy):
FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
matrices[i][slicer] = numpy.diff(matrices[i], axis=i)
This occurs at both usages of slicer. The solution seems to be to change slicer to a tuple.
I changed both slicers like this:
from slicer = [slice(1, None) if j == i else slice(None) for j in range(out.ndim)]
to slicer = tuple([slice(1, None) if j == i else slice(None) for j in range(out.ndim)])
Hope it helps!
The text was updated successfully, but these errors were encountered:
The current implementation of Anisotropic Diffusion gives two FutureWarnings (from numpy):
This occurs at both usages of
slicer
. The solution seems to be to changeslicer
to a tuple.I changed both slicers like this:
from
slicer = [slice(1, None) if j == i else slice(None) for j in range(out.ndim)]
to
slicer = tuple([slice(1, None) if j == i else slice(None) for j in range(out.ndim)])
Hope it helps!
The text was updated successfully, but these errors were encountered: