jni / i2k-skimage-napari

Repository for the scikit-image, napari, & friends tutorial at I2K 2020
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

ndi not defined #1

Closed tlambert03 closed 3 years ago

tlambert03 commented 3 years ago

in 1_image_filters ndi is used before it's defined ... around cell ~20

noisy_change = ndi.correlate(noisy_signal, np.array([-1, 0, 1]))
fig, ax = plt.subplots()
ax.plot(noisy_signal, label='signal')
ax.plot(noisy_change, linestyle='dashed', label='change')
ax.legend(loc='upper left')
ax.margins(0.1)

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-20-0ea399531763> in <module>
----> 1 noisy_change = ndi.correlate(noisy_signal, np.array([-1, 0, 1]))
      2 fig, ax = plt.subplots()
      3 ax.plot(noisy_signal, label='signal')
      4 ax.plot(noisy_change, linestyle='dashed', label='change')
      5 ax.legend(loc='upper left')

NameError: name 'ndi' is not defined

(note, it is later imported import scipy.ndimage as ndi ... but you must also have it in your auto-imports)