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

Skip to content

BUG: remove vestiges of array_api [wheel build] #25924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ def __getattr__(attr):
import numpy.char as char
return char
elif attr == "array_api":
import numpy.array_api as array_api
return array_api
raise AttributeError("`numpy.array_api` is not available from "
"numpy 2.0 onwards")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stanza could instead just be removed, but this way gives a nicer error.

elif attr == "core":
import numpy.core as core
return core
Expand Down
7 changes: 0 additions & 7 deletions numpy/_pytesttester.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,6 @@ def __call__(self, label='fast', verbose=1, extra_argv=None,
# so fetch module for suppression here.
from numpy.distutils import cpuinfo

with warnings.catch_warnings(record=True):
# Ignore the warning from importing the array_api submodule. This
# warning is done on import, so it would break pytest collection,
# but importing it early here prevents the warning from being
# issued when it imported again.
import numpy.array_api

# Filter out annoying import messages. Want these in both develop and
# release mode.
pytest_args += [
Expand Down