Skip to content
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

ENH, DOC: Improve foreign object interoperability #28096

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Slightly reduce footprint of changes
Avoid calling _wrapit from an error handler, to be more consistent with
original logic.
  • Loading branch information
miccoli committed Jan 6, 2025
commit be8924128cad5809a3ccad34fb53c777e3e653b5
5 changes: 2 additions & 3 deletions numpy/_core/fromnumeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ def _wrapit(obj, method, *args, **kwds):


def _wrapfunc(obj, method, *args, **kwds):
try:
bound = _get_method(obj, method)
except (AttributeError, TypeError):
bound = getattr(obj, method, NotImplemented)
if not callable(bound):
# attribute does not exists or is not callable
return _wrapit(obj, method, *args, **kwds)

Expand Down
Loading
  NODES
COMMUNITY 2
Note 1
Project 4
USERS 1