Skip to content

Commit 9ed3dd6

Browse files
committed
MAINT: Fixup np.array_api for linalg changes (extobj) removal
Original NumPy Commit: e90e9783c0af0de351bbf5def1652d49c767d587
1 parent 9899b78 commit 9ed3dd6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

array_api_strict/linalg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ def slogdet(x: Array, /) -> SlogdetResult:
292292
def _solve(a, b):
293293
from numpy.linalg.linalg import (_makearray, _assert_stacked_2d,
294294
_assert_stacked_square, _commonType,
295-
isComplexType, get_linalg_error_extobj,
296-
_raise_linalgerror_singular)
295+
isComplexType, _raise_linalgerror_singular)
297296
from numpy.linalg import _umath_linalg
298297

299298
a, _ = _makearray(a)
@@ -311,8 +310,9 @@ def _solve(a, b):
311310
# This does nothing currently but is left in because it will be relevant
312311
# when complex dtype support is added to the spec in 2022.
313312
signature = 'DD->D' if isComplexType(t) else 'dd->d'
314-
extobj = get_linalg_error_extobj(_raise_linalgerror_singular)
315-
r = gufunc(a, b, signature=signature, extobj=extobj)
313+
with errstate(call=_raise_linalgerror_singular, invalid='call',
314+
over='ignore', divide='ignore', under='ignore'):
315+
r = gufunc(a, b, signature=signature, extobj=extobj)
316316

317317
return wrap(r.astype(result_t, copy=False))
318318

0 commit comments

Comments
 (0)