Skip to content
Browse files

FIX: ndimage.distance_transform_edt ticket #954

  • Loading branch information...
1 parent f14e0fe commit fe23cf611159bc900091e6e935d840a0924df5fa @jjhelmus committed May 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 scipy/ndimage/morphology.py
View
2 scipy/ndimage/morphology.py
@@ -2160,7 +2160,7 @@ def distance_transform_edt(input, sampling = None,
ft_inplace = isinstance(indices, numpy.ndarray)
dt_inplace = isinstance(distances, numpy.ndarray)
# calculate the feature transform
- input = numpy.where(input, 1, 0).astype(numpy.int8)
+ input = numpy.atleast_1d(numpy.where(input, 1, 0).astype(numpy.int8))
if sampling is not None:
sampling = _ni_support._normalize_sequence(sampling, input.ndim)
sampling = numpy.asarray(sampling, dtype = numpy.float64)

0 comments on commit fe23cf6

Please sign in to comment.
Something went wrong with that request. Please try again.