MCPcopy Create free account
hub / github.com/numpy/numpy / solve

Function solve

numpy/array_api/linalg.py:331–342  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.linalg.solve `. See its docstring for more information.

(x1: Array, x2: Array, /)

Source from the content-addressed store, hash-verified

329 return wrap(r.astype(result_t, copy=False))
330
331def 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
344def svd(x: Array, /, *, full_matrices: bool = True) -> SVDResult:
345 """

Callers

nothing calls this directly

Calls 2

_solveFunction · 0.85
_newMethod · 0.80

Tested by

no test coverage detected