Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoid importing numpy.distutils #53

Closed
@mroeschke

Description

@mroeschke

The follow import statement seems to by default import numpy.distutils which has been deprecated:

     import scipy._lib.array_api_compat.array_api_compat.numpy as array_api_compat_numpy
../../../micromamba/envs/test/lib/python3.11/site-packages/scipy/_lib/array_api_compat/array_api_compat/numpy/__init__.py:1: in <module>
    from numpy import *
../../../micromamba/envs/test/lib/python3.11/site-packages/numpy/__init__.py:331: in __getattr__
    import numpy.distutils as distutils
../../../micromamba/envs/test/lib/python3.11/site-packages/numpy/distutils/__init__.py:31: in <module>
    warnings.warn("\n\n"
E   DeprecationWarning:
E
E     `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
E     of the deprecation of `distutils` itself. It will be removed for
E     Python >= 3.12. For older Python versions it will remain present.
E     It is recommended to use `setuptools < 60.0` for those Python versions.
E     For more details, see:
E       https://numpy.org/devdocs/reference/distutils_status_migration.html

I am guessing it is not needed for array-api-compat and would be great to avoid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions