Skip to content

DEP: Remove scipy.misc submodule  #15608

@AnirudhDagar

Description

@AnirudhDagar

Currently scipy.misc only serves for a handful of useful functions and some dataset functions. With the new submodule scipy.datasets to be introduced in #15607 we can essentially remove the misc submodule.

Currently it is home for the following 5 functions.

Method Description
central_diff_weights Return weights for an Np-point central derivative.
derivative Find the nth derivative of a function at a point.
ascent Get an 8-bit grayscale bit-depth, 512 x 512 derived image for easy use in demos
face Get a 1024 x 768, color image of a raccoon face.
electrocardiogram Load an electrocardiogram as an example for a 1-D signal.

The last 3 functions are datasets that can now live in the scipy.datasets submodule and we should deprecate these over a couple of cycles.

I wanted to open up this issue to particularly discuss the other two functions i.e central_diff_weights and derivative.
Which submodule should they move to? Should we slowly phase them out deprecating them now and probably remove them completely in a future version? I found that internally in SciPy we only have one such instance:

from scipy.misc import derivative

The question is if people really use these two methods. A quick stackoverflow and google search gave a few results for the scipy.misc.derivative but almost no discussion or usage around scipy.misc.central_diff_weights.

I feel derivative can be moved to the integrate submodule as it seems like a useful method. For central_diff_weights we can simply remove it.

cc @rgommers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions