Skip to content

Remove occurences of imread/imresize #10499

Closed
@lesteve

Description

@lesteve

Follow-up of #10427 (comment)

There are some remaining occurences of imread/imresize in doc and examples:

❯ git grep -P 'imread|imresize' | grep -v sklearn
doc/datasets/index.rst:* `scipy.misc.imread <https://docs.scipy.org/doc/scipy/reference/generated/scipy.
doc/datasets/index.rst:  misc.imread.html#scipy.misc.imread>`_ (requires the `Pillow
examples/classification/plot_digits_classification.py:# matplotlib.pyplot.imread.  Note that each image must have the same size. For these
examples/cluster/plot_face_segmentation.py:face = sp.misc.imresize(face, 0.10) / 255.
examples/cluster/plot_face_ward_segmentation.py:face = sp.misc.imresize(face, 0.10) / 255.

The pyplot.imread is fine. It's probably fine removing the mentions in index.rst and pointing to an alternative (maybe matplotlib.pyplot.imread?). For the examples, the simplest thing to do is to use sklearn.external._pilutil.imresize.

@jotasi since you worked on #10427, it would be great if you could tackle this one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    EasyWell-defined and straightforward way to resolvehelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions