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

Function det

numpy/array_api/linalg.py:82–92  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

80 return Array._new(np.cross(x1._array, x2._array, axis=axis))
81
82def det(x: Array, /) -> Array:
83 """
84 Array API compatible wrapper for :py:func:`np.linalg.det <numpy.linalg.det>`.
85
86 See its docstring for more information.
87 """
88 # Note: the restriction to floating-point dtypes only is different from
89 # np.linalg.det.
90 if x.dtype not in _floating_dtypes:
91 raise TypeError('Only floating-point dtypes are allowed in det')
92 return Array._new(np.linalg.det(x._array))
93
94# Note: diagonal is the numpy top-level namespace, not np.linalg
95def diagonal(x: Array, /, *, offset: int = 0) -> Array:

Callers

nothing calls this directly

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected