11
11
from __future__ import annotations
12
12
13
13
from ._types import Literal , Optional , Tuple , Union , array
14
+ from .constants import inf
14
15
from collections .abc import Sequence
15
16
16
17
def cholesky (x : array , / , * , upper : bool = False ) -> array :
@@ -46,7 +47,7 @@ def inv(x: array, /) -> array:
46
47
def matmul (x1 : array , x2 : array , / ) -> array :
47
48
pass
48
49
49
- def matrix_norm (x , / , * , axis = (- 2 , - 1 ), keepdims = False , ord = 'fro' ):
50
+ def matrix_norm (x : array , / , * , axis : Tuple [ int , int ] = (- 2 , - 1 ), keepdims : bool = False , ord : Optional [ Union [ int , float , Literal [ inf , - inf , 'fro' , 'nuc' ]]] = 'fro' ) -> array :
50
51
pass
51
52
52
53
def matrix_power (x : array , n : int , / ) -> array :
@@ -55,7 +56,7 @@ def matrix_power(x: array, n: int, /) -> array:
55
56
def matrix_rank (x : array , / , * , rtol : Optional [Union [float , array ]] = None ) -> array :
56
57
pass
57
58
58
- def matrix_transpose (x , / ):
59
+ def matrix_transpose (x : array , / ) -> array :
59
60
pass
60
61
61
62
def outer (x1 : array , x2 : array , / ) -> array :
@@ -88,7 +89,7 @@ def trace(x: array, /, *, offset: int = 0) -> array:
88
89
def vecdot (x1 : array , x2 : array , / , * , axis : Optional [int ] = None ) -> array :
89
90
pass
90
91
91
- def vector_norm (x , / , * , axis = None , keepdims = False , ord = 2 ) :
92
+ def vector_norm (x : array , / , * , axis : Optional [ Union [ int , Tuple [ int , int ]]] = None , keepdims : bool = False , ord : Optional [ Union [ int , float , Literal [ inf , - inf ]]] = 2 ) -> array :
92
93
pass
93
94
94
95
__all__ = ['cholesky' , 'cross' , 'det' , 'diagonal' , 'eig' , 'eigh' , 'eigvals' , 'eigvalsh' , 'einsum' , 'inv' , 'matmul' , 'matrix_norm' , 'matrix_power' , 'matrix_rank' , 'matrix_transpose' , 'outer' , 'pinv' , 'qr' , 'slogdet' , 'solve' , 'svd' , 'svdvals' , 'tensordot' , 'trace' , 'vecdot' , 'vector_norm' ]
0 commit comments