File size: 1,726 Bytes
c1dec76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
==========================================
Miscellaneous routines (:mod:`scipy.misc`)
==========================================

.. currentmodule:: scipy.misc

.. deprecated:: 1.10.0

   This module is deprecated and will be completely
   removed in SciPy v2.0.0.

Various utilities that don't have another home.

.. autosummary::
   :toctree: generated/

   ascent - Get example image for processing
   central_diff_weights - Weights for an n-point central mth derivative
   derivative - Find the nth derivative of a function at a point
   face - Get example image for processing
   electrocardiogram - Load an example of a 1-D signal

"""


from ._common import *
from . import _common
import warnings

# Deprecated namespaces, to be removed in v2.0.0
from . import common, doccer

__all__ = _common.__all__

dataset_methods = ['ascent', 'face', 'electrocardiogram']


def __dir__():
    return __all__


def __getattr__(name):
    if name not in __all__:
        raise AttributeError(
            "scipy.misc is deprecated and has no attribute "
            f"{name}.")

    if name in dataset_methods:
        msg = ("The module `scipy.misc` is deprecated and will be "
               "completely removed in SciPy v2.0.0. "
               f"All dataset methods including {name}, must be imported "
               "directly from the new `scipy.datasets` module.")
    else:
        msg = (f"The method `{name}` from the `scipy.misc` namespace is"
               " deprecated, and will be removed in SciPy v1.12.0.")

    warnings.warn(msg, category=DeprecationWarning, stacklevel=2)

    return getattr(name)


del _common

from scipy._lib._testutils import PytestTester
test = PytestTester(__name__)
del PytestTester