naucse.python.cz
naucse.python.cz copied to clipboard
NumPy: Deprecated SciPy API
>>> import scipy.ndimage
>>> img = scipy.ndimage.imread('static/python.jpg', mode='RGB')
>>> img
/home/churchyard/Dokumenty/pyvec/naucse.python.cz/__env__/lib64/python3.5/site-packages/ipykernel_launcher.py:2: DeprecationWarning: `imread` is deprecated!
`imread` is deprecated in SciPy 1.0.0.
Use ``matplotlib.pyplot.imread`` instead.
Changing to matplotlib.pyplot.imread
is not 1:1, it doesn't have mode
.
Ah, yeah, that's a new development.
We can use pillow
directly, or use the matplotlib function and assume a jpeg
is always RGB.
I think using pillow would actually work better here, as a pointer to another useful library.
The docs say use imageio.imread
.
Link to the scipy 1.0 docs