Array API compatible wrapper for :py:func:`np.linalg.solve `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 329 | return wrap(r.astype(result_t, copy=False)) |
| 330 | |
| 331 | def solve(x1: Array, x2: Array, /) -> Array: |
| 332 | """ |
| 333 | Array API compatible wrapper for :py:func:`np.linalg.solve <numpy.linalg.solve>`. |
| 334 | |
| 335 | See its docstring for more information. |
| 336 | """ |
| 337 | # Note: the restriction to floating-point dtypes only is different from |
| 338 | # np.linalg.solve. |
| 339 | if x1.dtype not in _floating_dtypes or x2.dtype not in _floating_dtypes: |
| 340 | raise TypeError('Only floating-point dtypes are allowed in solve') |
| 341 | |
| 342 | return Array._new(_solve(x1._array, x2._array)) |
| 343 | |
| 344 | def svd(x: Array, /, *, full_matrices: bool = True) -> SVDResult: |
| 345 | """ |