Skip to content

Commit 7661247

Browse files
committed
Add several names to linalg that are not in np.linalg
1 parent 0a3eafd commit 7661247

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

numpy_array_api_compat/linalg.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,10 @@ def vector_norm(x: ndarray, /, *, axis: Optional[Union[int, Tuple[int, ...]]] =
4747

4848
from numpy.linalg import *
4949
from numpy.linalg import __all__ as linalg_all
50+
51+
# These are in the main NumPy namespace but not in numpy.linalg
52+
from numpy import cross, diagonal, matmul, outer, tensordot, trace
53+
5054
__all__ = linalg_all.copy()
51-
__all__ += ['matrix_norm', 'vector_norm']
55+
__all__ += ['cross', 'diagonal', 'matmul', 'matrix_norm', 'outer',
56+
'tensordot', 'trace', 'vector_norm']

0 commit comments

Comments
 (0)