Testing the function,
using Python 2.7.13, Ipython 5.1.0, skimage 0.13.0,
and Python 3.6.7, Ipython 7.4.0, skimage 0.15.0:
In [1]: from skimage import io
In [2]: a = io.imread('testimg.tif')
In [3]: type(a)
Out[3]: numpy.ndarray
your link to the documentation is skimage 0.16.0, but I think it is safe to assume that there simply is a typo in the documentation.
edit: also, looking at the source:
def imread(fname, as_gray=False, plugin=None, flatten=None,
**plugin_args):
"""Load an image from file.
Parameters
----------
fname : string
Image file name, e.g. ``test.jpg`` or URL.
as_gray : bool, optional
If True, convert color images to gray-scale (64-bit floats).
Images that are already in gray-scale format are not converted.
plugin : str, optional
Name of plugin to use. By default, the different plugins are
tried (starting with imageio) until a suitable
candidate is found. If not given and fname is a tiff file, the
tifffile plugin will be used.
Other Parameters
----------------
plugin_args : keywords
Passed to the given plugin.
flatten : bool
Backward compatible keyword, superseded by `as_gray`.
Returns
-------
img_array : ndarray
The different color bands/channels are stored in the
third dimension, such that a gray-image is MxN, an
RGB-image MxNx3 and an RGBA-image MxNx4.
imread
now returns their own object instead of a numpy array. Callnp.asarray
on the result to get a standard NumPy array, or useio.imread(..., plugin='matplotlib')
orio.imread(..., plugin='pil')
for now to avoid the issue. This will be fixed in the next point release.imread
does NOT return a standard np array?img_array : ndarray
, withndarray
referring tonumpy.ndarray
. See this page in the docs for how to use them: scikit-image.org/docs/dev/user_guide/numpy_images.html and see the NumPy documentation for more about NumPy arrays: docs.scipy.org/doc/numpy-1.16.1