Harmonize all ndimage usage across the library

Only two forms remain in use:

- `from scipy import ndimage as ndi`
- `from scipy.ndimage import function`
This commit is contained in:
Juan Nunez-Iglesias
2015-06-09 15:18:37 +10:00
parent 82a5d0c5d9
commit 0d134987f9
47 changed files with 173 additions and 185 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ the hysteresis thresholding.
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage
from scipy import ndimage as ndi
from skimage import feature
@@ -26,8 +26,8 @@ from skimage import feature
im = np.zeros((128, 128))
im[32:-32, 32:-32] = 1
im = ndimage.rotate(im, 15, mode='constant')
im = ndimage.gaussian_filter(im, 4)
im = ndi.rotate(im, 15, mode='constant')
im = ndi.gaussian_filter(im, 4)
im += 0.2 * np.random.random(im.shape)
# Compute the Canny filter for two values of sigma