Array API compatible wrapper for :py:func:`np.linalg.det `. See its docstring for more information.
(x: Array, /)
| 80 | return Array._new(np.cross(x1._array, x2._array, axis=axis)) |
| 81 | |
| 82 | def 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 |
| 95 | def diagonal(x: Array, /, *, offset: int = 0) -> Array: |