Skip to content

TST: scipy.misc.ascent has been deprecated in SciPy v1.10.0 #13644

Closed

Description

@pllim

Example log: https://github.com/astropy/astropy/runs/8299487818?check_suite_focus=true

______________ TestCompressedImage.test_comp_image_quantize_level ______________

self = <astropy.io.fits.tests.test_image.TestCompressedImage object at 0x7fd57406a650>

    @pytest.mark.skipif('not HAS_SCIPY')
    def test_comp_image_quantize_level(self):
        """
        Regression test for https://github.com/astropy/astropy/issues/5969
    
        Test that quantize_level is used.
    
        """
        import scipy.misc
        np.random.seed(42)
>       data = scipy.misc.ascent() + np.random.randn(512, 512)*10

.../astropy/io/fits/tests/test_image.py:1137: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (), kwargs = {}

    @functools.wraps(fun)
    def call(*args, **kwargs):
>       warnings.warn(msg, category=DeprecationWarning,
                      stacklevel=stacklevel)
E       DeprecationWarning: scipy.misc.ascent has been deprecated in SciPy v1.10.0;
and will be completely removed in SciPy v1.12.0. Dataset methods have moved
into the scipy.datasets module. Use scipy.datasets.ascent instead.

.../scipy/_lib/deprecation.py:18: DeprecationWarning

Activity

  1. pllim commented on Sep 12, 2022

    @pllim
    MemberAuthor

    The new API was just added, so we need to call different APIs depending on scipy version check.

    scipy/scipy#15607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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