-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: fix issues with newaxis
and linalg.solve
in numpy.array_api
#25146
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
inf = np.inf | ||
nan = np.nan | ||
pi = np.pi | ||
newaxis = np.newaxis |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -318,9 +318,9 @@ def _solve(a, b): | |
# This does nothing currently but is left in because it will be relevant | ||
# when complex dtype support is added to the spec in 2022. | ||
signature = 'DD->D' if isComplexType(t) else 'dd->d' | ||
with errstate(call=_raise_linalgerror_singular, invalid='call', | ||
over='ignore', divide='ignore', under='ignore'): | ||
r = gufunc(a, b, signature=signature, extobj=extobj) | ||
with np.errstate(call=_raise_linalgerror_singular, invalid='call', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting that the errstate removal did make it? Anyay, LGTM, thanks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the implementation here was added before this was thoroughly tested in the test suite. Maybe the |
||
over='ignore', divide='ignore', under='ignore'): | ||
r = gufunc(a, b, signature=signature) | ||
|
||
return wrap(r.astype(result_t, copy=False)) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be added here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make a PR?