@@ -10,192 +10,202 @@ _Array2ND: TypeAlias = _nt.Array[_ScalarT, _nt.Shape2N]
1010
1111###
1212
13- AR_i8 : _nt .Array [np .int64 ]
14- AR_f8 : _nt .Array [np .float64 ]
15- AR_c16 : _nt .Array [np .complex128 ]
16- AR_O : _nt .Array [np .object_ ]
17- AR_m : _nt .Array [np .timedelta64 ]
18- AR_S : _nt .Array [np .str_ ]
19- AR_b : _nt . Array [ np . bool ]
20-
21- i_0d : int
22-
23- b_1d : list [ bool ]
24- i_1d : list [ int ]
25- f_1d : list [ float ]
26- c_1d : list [complex ]
27- S_1d : list [bytes ]
28- U_1d : list [str ]
29-
30- b_2d : list [list [ bool ] ]
31- i_2d : list [list [ int ] ]
32- f_2d : list [ list [ float ]]
33- c_2d : list [list [complex ]]
34- S_2d : list [list [bytes ]]
35- U_2d : list [list [str ]]
36-
37- b_3d : list [list [list [ bool ] ]]
38- i_3d : list [list [list [ int ] ]]
39- f_3d : list [ list [ list [ float ]]]
40- c_3d : list [list [list [complex ]]]
41- S_3d : list [list [list [bytes ]]]
42- U_3d : list [list [list [str ]]]
43-
44- i_4d : list [list [list [list [int ]]]]
13+ b_nd : _nt .Array [np .bool ]
14+ i8_nd : _nt .Array [np .int64 ]
15+ f4_nd : _nt .Array [np .float32 ]
16+ f8_nd : _nt .Array [np .float64 ]
17+ c8_nd : _nt .Array [np .complex64 ]
18+ c16_nd : _nt .Array [np .complex128 ]
19+
20+ O_nd : _nt . Array [ np . object_ ]
21+ m_nd : _nt . Array [ np . timedelta64 ]
22+ S_nd : _nt . Array [ np . str_ ]
23+
24+ py_i_0d : int
25+
26+ py_b_1d : list [bool ]
27+ py_i_1d : list [int ]
28+ py_f_1d : list [float ]
29+ py_c_1d : list [ complex ]
30+ py_S_1d : list [bytes ]
31+ py_U_1d : list [str ]
32+
33+ py_b_2d : list [list [bool ]]
34+ py_i_2d : list [list [int ]]
35+ py_f_2d : list [list [float ]]
36+ py_c_2d : list [ list [ complex ]]
37+ py_S_2d : list [list [bytes ]]
38+ py_U_2d : list [list [str ]]
39+
40+ py_i_3d : list [list [list [int ]]]
41+ py_f_3d : list [list [list [float ]]]
42+ py_c_3d : list [list [list [complex ]]]
43+
44+ py_i_4d : list [list [list [list [int ]]]]
4545
4646###
4747
48- assert_type (np .linalg .tensorsolve (AR_i8 , AR_i8 ), _nt .Array [np .float64 ])
49- assert_type (np .linalg .tensorsolve (AR_i8 , AR_f8 ), _nt .Array [np .float64 ])
50- assert_type (np .linalg .tensorsolve (AR_c16 , AR_f8 ), _nt .Array [np .complex128 ])
51-
52- assert_type (np .linalg .solve (AR_i8 , AR_i8 ), _nt .Array [np .float64 ])
53- assert_type (np .linalg .solve (AR_i8 , AR_f8 ), _nt .Array [np .float64 ])
54- assert_type (np .linalg .solve (AR_c16 , AR_f8 ), _nt .Array [np .complex128 ])
55-
56- assert_type (np .linalg .tensorinv (AR_i8 ), _Array2ND [np .float64 ])
57- assert_type (np .linalg .tensorinv (AR_f8 ), _Array2ND [np .float64 ])
58- assert_type (np .linalg .tensorinv (AR_c16 ), _Array2ND [np .complex128 ])
59-
60- assert_type (np .linalg .inv (AR_i8 ), _Array2ND [np .float64 ])
61- assert_type (np .linalg .inv (AR_f8 ), _Array2ND [np .float64 ])
62- assert_type (np .linalg .inv (AR_c16 ), _Array2ND [np .complex128 ])
63-
64- assert_type (np .linalg .matrix_power (AR_i8 , - 1 ), _Array2ND [np .float64 ])
65- assert_type (np .linalg .matrix_power (AR_f8 , 0 ), _Array2ND [np .float64 ])
66- assert_type (np .linalg .matrix_power (AR_c16 , 1 ), _Array2ND [np .complex128 ])
67- assert_type (np .linalg .matrix_power (AR_O , 2 ), _Array2ND [np .object_ ])
68-
69- assert_type (np .linalg .cholesky (AR_i8 ), _Array2ND [np .float64 ])
70- assert_type (np .linalg .cholesky (AR_f8 ), _Array2ND [np .float64 ])
71- assert_type (np .linalg .cholesky (AR_c16 ), _Array2ND [np .complex128 ])
72-
73- assert_type (np .linalg .outer (AR_i8 , AR_i8 ), _nt .Array2D [np .int64 ])
74- assert_type (np .linalg .outer (AR_f8 , AR_f8 ), _nt .Array2D [np .float64 ])
75- assert_type (np .linalg .outer (AR_c16 , AR_c16 ), _nt .Array2D [np .complex128 ])
76- assert_type (np .linalg .outer (AR_b , AR_b ), _nt .Array2D [np .bool ])
77- assert_type (np .linalg .outer (AR_O , AR_O ), _nt .Array2D [np .object_ ])
78- assert_type (np .linalg .outer (AR_i8 , AR_m ), _nt .Array2D [np .timedelta64 ])
79-
80- assert_type (np .linalg .qr (AR_i8 ), QRResult [np .float64 ])
81- assert_type (np .linalg .qr (AR_f8 ), QRResult [np .float64 ])
82- assert_type (np .linalg .qr (AR_c16 ), QRResult [np .complex128 ])
83-
84- assert_type (np .linalg .eigvals (AR_i8 ), _nt .Array [np .float64 ] | _nt .Array [np .complex128 ])
85- assert_type (np .linalg .eigvals (AR_f8 ), _nt .Array [np .float64 ] | _nt .Array [np .complex128 ])
86- assert_type (np .linalg .eigvals (AR_c16 ), _nt .Array [np .complex128 ])
87-
88- assert_type (np .linalg .eigvalsh (AR_i8 ), _nt .Array [np .float64 ])
89- assert_type (np .linalg .eigvalsh (AR_f8 ), _nt .Array [np .float64 ])
90- assert_type (np .linalg .eigvalsh (AR_c16 ), _nt .Array [np .float64 ])
91-
92- assert_type (np .linalg .eig (AR_i8 ), EigResult [np .float64 ] | EigResult [np .complex128 ])
93- assert_type (np .linalg .eig (AR_f8 ), EigResult [np .float64 ] | EigResult [np .complex128 ])
94- assert_type (np .linalg .eig (AR_c16 ), EigResult [np .complex128 ])
95-
96- assert_type (np .linalg .eigh (AR_i8 ), EighResult [np .float64 , np .float64 ])
97- assert_type (np .linalg .eigh (AR_f8 ), EighResult [np .float64 , np .float64 ])
98- assert_type (np .linalg .eigh (AR_c16 ), EighResult [np .float64 , np .complex128 ])
99-
100- assert_type (np .linalg .svd (AR_i8 ), SVDResult [np .float64 , np .float64 ])
101- assert_type (np .linalg .svd (AR_f8 ), SVDResult [np .float64 , np .float64 ])
102- assert_type (np .linalg .svd (AR_c16 ), SVDResult [np .float64 , np .complex128 ])
103- assert_type (np .linalg .svd (AR_i8 , compute_uv = False ), _nt .Array [np .float64 ])
104- assert_type (np .linalg .svd (AR_f8 , compute_uv = False ), _nt .Array [np .float64 ])
105- assert_type (np .linalg .svd (AR_c16 , compute_uv = False ), _nt .Array [np .float64 ])
48+ assert_type (np .linalg .tensorsolve (i8_nd , i8_nd ), _nt .Array [np .float64 ])
49+ assert_type (np .linalg .tensorsolve (i8_nd , f8_nd ), _nt .Array [np .float64 ])
50+ assert_type (np .linalg .tensorsolve (c16_nd , f8_nd ), _nt .Array [np .complex128 ])
51+
52+ assert_type (np .linalg .solve (i8_nd , i8_nd ), _nt .Array [np .float64 ])
53+ assert_type (np .linalg .solve (i8_nd , f8_nd ), _nt .Array [np .float64 ])
54+ assert_type (np .linalg .solve (c16_nd , f8_nd ), _nt .Array [np .complex128 ])
55+
56+ assert_type (np .linalg .tensorinv (i8_nd ), _Array2ND [np .float64 ])
57+ assert_type (np .linalg .tensorinv (f4_nd ), _Array2ND [np .float32 ])
58+ assert_type (np .linalg .tensorinv (f8_nd ), _Array2ND [np .float64 ])
59+ assert_type (np .linalg .tensorinv (c8_nd ), _Array2ND [np .complex64 ])
60+ assert_type (np .linalg .tensorinv (c16_nd ), _Array2ND [np .complex128 ])
61+ assert_type (np .linalg .tensorinv (py_i_2d ), _Array2ND [np .float64 ])
62+ assert_type (np .linalg .tensorinv (py_f_2d ), _Array2ND [np .float64 ])
63+ assert_type (np .linalg .tensorinv (py_c_2d ), _Array2ND [np .complex128 ])
64+
65+ assert_type (np .linalg .inv (i8_nd ), _Array2ND [np .float64 ])
66+ assert_type (np .linalg .inv (f4_nd ), _Array2ND [np .float32 ])
67+ assert_type (np .linalg .inv (f8_nd ), _Array2ND [np .float64 ])
68+ assert_type (np .linalg .inv (c8_nd ), _Array2ND [np .complex64 ])
69+ assert_type (np .linalg .inv (c16_nd ), _Array2ND [np .complex128 ])
70+ assert_type (np .linalg .inv (py_i_2d ), _Array2ND [np .float64 ])
71+ assert_type (np .linalg .inv (py_f_2d ), _Array2ND [np .float64 ])
72+ assert_type (np .linalg .inv (py_c_2d ), _Array2ND [np .complex128 ])
73+
74+ assert_type (np .linalg .matrix_power (i8_nd , - 1 ), _Array2ND [np .float64 ])
75+ assert_type (np .linalg .matrix_power (f8_nd , 0 ), _Array2ND [np .float64 ])
76+ assert_type (np .linalg .matrix_power (c16_nd , 1 ), _Array2ND [np .complex128 ])
77+ assert_type (np .linalg .matrix_power (O_nd , 2 ), _Array2ND [np .object_ ])
78+
79+ assert_type (np .linalg .cholesky (i8_nd ), _Array2ND [np .float64 ])
80+ assert_type (np .linalg .cholesky (f8_nd ), _Array2ND [np .float64 ])
81+ assert_type (np .linalg .cholesky (c16_nd ), _Array2ND [np .complex128 ])
82+
83+ assert_type (np .linalg .outer (i8_nd , i8_nd ), _nt .Array2D [np .int64 ])
84+ assert_type (np .linalg .outer (f8_nd , f8_nd ), _nt .Array2D [np .float64 ])
85+ assert_type (np .linalg .outer (c16_nd , c16_nd ), _nt .Array2D [np .complex128 ])
86+ assert_type (np .linalg .outer (b_nd , b_nd ), _nt .Array2D [np .bool ])
87+ assert_type (np .linalg .outer (O_nd , O_nd ), _nt .Array2D [np .object_ ])
88+ assert_type (np .linalg .outer (i8_nd , m_nd ), _nt .Array2D [np .timedelta64 ])
89+
90+ assert_type (np .linalg .qr (i8_nd ), QRResult [np .float64 ])
91+ assert_type (np .linalg .qr (f8_nd ), QRResult [np .float64 ])
92+ assert_type (np .linalg .qr (c16_nd ), QRResult [np .complex128 ])
93+
94+ assert_type (np .linalg .eigvals (i8_nd ), _nt .Array [np .float64 ] | _nt .Array [np .complex128 ])
95+ assert_type (np .linalg .eigvals (f8_nd ), _nt .Array [np .float64 ] | _nt .Array [np .complex128 ])
96+ assert_type (np .linalg .eigvals (c16_nd ), _nt .Array [np .complex128 ])
97+
98+ assert_type (np .linalg .eigvalsh (i8_nd ), _nt .Array [np .float64 ])
99+ assert_type (np .linalg .eigvalsh (f8_nd ), _nt .Array [np .float64 ])
100+ assert_type (np .linalg .eigvalsh (c16_nd ), _nt .Array [np .float64 ])
101+
102+ assert_type (np .linalg .eig (i8_nd ), EigResult [np .float64 ] | EigResult [np .complex128 ])
103+ assert_type (np .linalg .eig (f8_nd ), EigResult [np .float64 ] | EigResult [np .complex128 ])
104+ assert_type (np .linalg .eig (c16_nd ), EigResult [np .complex128 ])
105+
106+ assert_type (np .linalg .eigh (i8_nd ), EighResult [np .float64 , np .float64 ])
107+ assert_type (np .linalg .eigh (f8_nd ), EighResult [np .float64 , np .float64 ])
108+ assert_type (np .linalg .eigh (c16_nd ), EighResult [np .float64 , np .complex128 ])
109+
110+ assert_type (np .linalg .svd (i8_nd ), SVDResult [np .float64 , np .float64 ])
111+ assert_type (np .linalg .svd (f8_nd ), SVDResult [np .float64 , np .float64 ])
112+ assert_type (np .linalg .svd (c16_nd ), SVDResult [np .float64 , np .complex128 ])
113+ assert_type (np .linalg .svd (i8_nd , compute_uv = False ), _nt .Array [np .float64 ])
114+ assert_type (np .linalg .svd (f8_nd , compute_uv = False ), _nt .Array [np .float64 ])
115+ assert_type (np .linalg .svd (c16_nd , compute_uv = False ), _nt .Array [np .float64 ])
106116
107117assert_type (np .linalg .cond ([[1 , 0 ], [0 , 1 ]]), np .float64 )
108118assert_type (np .linalg .cond ([[[1 , 0 ], [0 , 1 ]]]), _nt .Array [np .float64 ])
109- assert_type (np .linalg .cond (AR_i8 ), Any )
110- assert_type (np .linalg .cond (AR_f8 ), Any )
111- assert_type (np .linalg .cond (AR_c16 ), Any )
112-
113- assert_type (np .linalg .matrix_rank (i_0d ), Literal [0 , 1 ])
114- assert_type (np .linalg .matrix_rank (i_1d ), Literal [0 , 1 ])
115- assert_type (np .linalg .matrix_rank (i_2d ), np .int_ )
116- assert_type (np .linalg .matrix_rank (i_3d ), _nt .Array [np .int_ ])
117- assert_type (np .linalg .matrix_rank (i_4d ), _nt .Array [np .int_ ])
118- assert_type (np .linalg .matrix_rank (AR_i8 ), Any )
119- assert_type (np .linalg .matrix_rank (AR_f8 ), Any )
120- assert_type (np .linalg .matrix_rank (AR_c16 ), Any )
121-
122- assert_type (np .linalg .pinv (AR_i8 ), _Array2ND [np .float64 ])
123- assert_type (np .linalg .pinv (AR_f8 ), _Array2ND [np .float64 ])
124- assert_type (np .linalg .pinv (AR_c16 ), _Array2ND [np .complex128 ])
125-
126- assert_type (np .linalg .slogdet (i_2d ), SlogdetResult [np .float64 , np .float64 ])
127- assert_type (np .linalg .slogdet ([f_1d ]), SlogdetResult [np .float64 , np .float64 ])
128- assert_type (np .linalg .slogdet (c_2d ), SlogdetResult [np .float64 , np .complex128 ])
129- assert_type (np .linalg .slogdet (i_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .float64 ]])
130- assert_type (np .linalg .slogdet (f_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .float64 ]])
131- assert_type (np .linalg .slogdet (c_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .complex128 ]])
132- assert_type (np .linalg .slogdet (AR_i8 ), SlogdetResult )
133- assert_type (np .linalg .slogdet (AR_f8 ), SlogdetResult )
134- assert_type (np .linalg .slogdet (AR_c16 ), SlogdetResult )
135-
136- assert_type (np .linalg .det (AR_i8 ), Any )
137- assert_type (np .linalg .det (AR_f8 ), Any )
138- assert_type (np .linalg .det (AR_c16 ), Any )
119+ assert_type (np .linalg .cond (i8_nd ), Any )
120+ assert_type (np .linalg .cond (f8_nd ), Any )
121+ assert_type (np .linalg .cond (c16_nd ), Any )
122+
123+ assert_type (np .linalg .matrix_rank (py_i_0d ), Literal [0 , 1 ])
124+ assert_type (np .linalg .matrix_rank (py_i_1d ), Literal [0 , 1 ])
125+ assert_type (np .linalg .matrix_rank (py_i_2d ), np .int_ )
126+ assert_type (np .linalg .matrix_rank (py_i_3d ), _nt .Array [np .int_ ])
127+ assert_type (np .linalg .matrix_rank (py_i_4d ), _nt .Array [np .int_ ])
128+ assert_type (np .linalg .matrix_rank (i8_nd ), Any )
129+ assert_type (np .linalg .matrix_rank (f8_nd ), Any )
130+ assert_type (np .linalg .matrix_rank (c16_nd ), Any )
131+
132+ assert_type (np .linalg .pinv (i8_nd ), _Array2ND [np .float64 ])
133+ assert_type (np .linalg .pinv (f8_nd ), _Array2ND [np .float64 ])
134+ assert_type (np .linalg .pinv (c16_nd ), _Array2ND [np .complex128 ])
135+
136+ assert_type (np .linalg .slogdet (py_i_2d ), SlogdetResult [np .float64 , np .float64 ])
137+ assert_type (np .linalg .slogdet ([py_f_1d ]), SlogdetResult [np .float64 , np .float64 ])
138+ assert_type (np .linalg .slogdet (py_c_2d ), SlogdetResult [np .float64 , np .complex128 ])
139+ assert_type (np .linalg .slogdet (py_i_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .float64 ]])
140+ assert_type (np .linalg .slogdet (py_f_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .float64 ]])
141+ assert_type (np .linalg .slogdet (py_c_3d ), SlogdetResult [_nt .Array [np .float64 ], _nt .Array [np .complex128 ]])
142+ assert_type (np .linalg .slogdet (i8_nd ), SlogdetResult )
143+ assert_type (np .linalg .slogdet (f8_nd ), SlogdetResult )
144+ assert_type (np .linalg .slogdet (c16_nd ), SlogdetResult )
145+
146+ assert_type (np .linalg .det (i8_nd ), Any )
147+ assert_type (np .linalg .det (f8_nd ), Any )
148+ assert_type (np .linalg .det (c16_nd ), Any )
139149
140150assert_type (
141- np .linalg .lstsq (AR_i8 , AR_i8 ), tuple [_nt .Array [np .float64 ], _nt .Array [np .float64 ], np .int32 , _nt .Array [np .float64 ]]
151+ np .linalg .lstsq (i8_nd , i8_nd ), tuple [_nt .Array [np .float64 ], _nt .Array [np .float64 ], np .int32 , _nt .Array [np .float64 ]]
142152)
143153assert_type (
144- np .linalg .lstsq (AR_i8 , AR_f8 ), tuple [_nt .Array [np .float64 ], _nt .Array [np .float64 ], np .int32 , _nt .Array [np .float64 ]]
154+ np .linalg .lstsq (i8_nd , f8_nd ), tuple [_nt .Array [np .float64 ], _nt .Array [np .float64 ], np .int32 , _nt .Array [np .float64 ]]
145155)
146156assert_type (
147- np .linalg .lstsq (AR_f8 , AR_c16 ),
157+ np .linalg .lstsq (f8_nd , c16_nd ),
148158 tuple [_nt .Array [np .complex128 ], _nt .Array [np .float64 ], np .int32 , _nt .Array [np .float64 ]],
149159)
150160
151- assert_type (np .linalg .norm (AR_i8 ), np .float64 )
152- assert_type (np .linalg .norm (AR_f8 ), np .float64 )
153- assert_type (np .linalg .norm (AR_c16 ), np .float64 )
154- assert_type (np .linalg .norm (AR_S ), np .float64 )
155- assert_type (np .linalg .norm (AR_f8 , axis = 0 ), _nt .Array [np .float64 ])
156- assert_type (np .linalg .norm (AR_f8 , keepdims = True ), _Array2ND [np .float64 ])
157-
158- assert_type (np .linalg .matrix_norm (b_2d ), np .float64 )
159- assert_type (np .linalg .matrix_norm (i_2d ), np .float64 )
160- assert_type (np .linalg .matrix_norm (c_2d ), np .float64 )
161- assert_type (np .linalg .matrix_norm (U_2d ), np .float64 )
162- assert_type (np .linalg .matrix_norm (S_2d ), np .float64 )
163- assert_type (np .linalg .matrix_norm ([b_2d ]), _nt .Array [np .float64 ])
164- assert_type (np .linalg .matrix_norm (i_3d ), _nt .Array [np .float64 ])
165- assert_type (np .linalg .matrix_norm (c_3d ), _nt .Array [np .float64 ])
166- assert_type (np .linalg .matrix_norm ([U_2d ]), _nt .Array [np .float64 ])
167- assert_type (np .linalg .matrix_norm ([S_2d ]), _nt .Array [np .float64 ])
168- assert_type (np .linalg .matrix_norm (AR_i8 ), Any )
169- assert_type (np .linalg .matrix_norm (AR_f8 ), Any )
170- assert_type (np .linalg .matrix_norm (AR_c16 ), Any )
171- assert_type (np .linalg .matrix_norm (AR_S ), Any )
172-
173- assert_type (np .linalg .vector_norm (AR_i8 ), np .float64 )
174- assert_type (np .linalg .vector_norm (AR_f8 ), np .float64 )
175- assert_type (np .linalg .vector_norm (AR_c16 ), np .float64 )
176- assert_type (np .linalg .vector_norm (AR_S ), np .float64 )
177-
178- assert_type (np .linalg .multi_dot (b_2d ), np .bool )
179- assert_type (np .linalg .multi_dot (i_2d ), np .int_ )
180- assert_type (np .linalg .multi_dot (f_2d ), np .float64 )
181- assert_type (np .linalg .multi_dot (c_2d ), np .complex128 )
182- assert_type (np .linalg .multi_dot ([AR_i8 , AR_i8 ]), Any )
183- assert_type (np .linalg .multi_dot ([AR_i8 , AR_f8 ]), Any )
184- assert_type (np .linalg .multi_dot ([AR_f8 , AR_c16 ]), Any )
185- assert_type (np .linalg .multi_dot ([AR_O , AR_O ]), Any )
186- assert_type (np .linalg .multi_dot ([AR_m , AR_m ]), Any )
187-
188- assert_type (np .linalg .cross (AR_i8 , AR_i8 ), _nt .Array [np .int64 ])
189- assert_type (np .linalg .cross (AR_f8 , AR_f8 ), _nt .Array [np .float64 ])
190- assert_type (np .linalg .cross (AR_c16 , AR_c16 ), _nt .Array [np .complex128 ])
191-
192- assert_type (np .linalg .matmul (b_1d , b_1d ), np .bool )
193- assert_type (np .linalg .matmul (i_1d , i_1d ), np .int_ )
194- assert_type (np .linalg .matmul (i_1d , b_1d ), np .int_ )
195- assert_type (np .linalg .matmul (f_1d , f_1d ), np .float64 )
196- assert_type (np .linalg .matmul (f_1d , i_1d ), np .float64 )
197- assert_type (np .linalg .matmul (c_1d , c_1d ), np .complex128 )
198- assert_type (np .linalg .matmul (b_1d , c_1d ), np .complex128 )
199- assert_type (np .linalg .matmul (AR_i8 , AR_i8 ), Any )
200- assert_type (np .linalg .matmul (AR_f8 , AR_f8 ), Any )
201- assert_type (np .linalg .matmul (AR_c16 , AR_c16 ), Any )
161+ assert_type (np .linalg .norm (i8_nd ), np .float64 )
162+ assert_type (np .linalg .norm (f8_nd ), np .float64 )
163+ assert_type (np .linalg .norm (c16_nd ), np .float64 )
164+ assert_type (np .linalg .norm (S_nd ), np .float64 )
165+ assert_type (np .linalg .norm (f8_nd , axis = 0 ), _nt .Array [np .float64 ])
166+ assert_type (np .linalg .norm (f8_nd , keepdims = True ), _Array2ND [np .float64 ])
167+
168+ assert_type (np .linalg .matrix_norm (py_b_2d ), np .float64 )
169+ assert_type (np .linalg .matrix_norm (py_i_2d ), np .float64 )
170+ assert_type (np .linalg .matrix_norm (py_c_2d ), np .float64 )
171+ assert_type (np .linalg .matrix_norm (py_U_2d ), np .float64 )
172+ assert_type (np .linalg .matrix_norm (py_S_2d ), np .float64 )
173+ assert_type (np .linalg .matrix_norm ([py_b_2d ]), _nt .Array [np .float64 ])
174+ assert_type (np .linalg .matrix_norm (py_i_3d ), _nt .Array [np .float64 ])
175+ assert_type (np .linalg .matrix_norm (py_c_3d ), _nt .Array [np .float64 ])
176+ assert_type (np .linalg .matrix_norm ([py_U_2d ]), _nt .Array [np .float64 ])
177+ assert_type (np .linalg .matrix_norm ([py_S_2d ]), _nt .Array [np .float64 ])
178+ assert_type (np .linalg .matrix_norm (i8_nd ), Any )
179+ assert_type (np .linalg .matrix_norm (f8_nd ), Any )
180+ assert_type (np .linalg .matrix_norm (c16_nd ), Any )
181+ assert_type (np .linalg .matrix_norm (S_nd ), Any )
182+
183+ assert_type (np .linalg .vector_norm (i8_nd ), np .float64 )
184+ assert_type (np .linalg .vector_norm (f8_nd ), np .float64 )
185+ assert_type (np .linalg .vector_norm (c16_nd ), np .float64 )
186+ assert_type (np .linalg .vector_norm (S_nd ), np .float64 )
187+
188+ assert_type (np .linalg .multi_dot (py_b_2d ), np .bool )
189+ assert_type (np .linalg .multi_dot (py_i_2d ), np .int_ )
190+ assert_type (np .linalg .multi_dot (py_f_2d ), np .float64 )
191+ assert_type (np .linalg .multi_dot (py_c_2d ), np .complex128 )
192+ assert_type (np .linalg .multi_dot ([i8_nd , i8_nd ]), Any )
193+ assert_type (np .linalg .multi_dot ([i8_nd , f8_nd ]), Any )
194+ assert_type (np .linalg .multi_dot ([f8_nd , c16_nd ]), Any )
195+ assert_type (np .linalg .multi_dot ([O_nd , O_nd ]), Any )
196+ assert_type (np .linalg .multi_dot ([m_nd , m_nd ]), Any )
197+
198+ assert_type (np .linalg .cross (i8_nd , i8_nd ), _nt .Array [np .int64 ])
199+ assert_type (np .linalg .cross (f8_nd , f8_nd ), _nt .Array [np .float64 ])
200+ assert_type (np .linalg .cross (c16_nd , c16_nd ), _nt .Array [np .complex128 ])
201+
202+ assert_type (np .linalg .matmul (py_b_1d , py_b_1d ), np .bool )
203+ assert_type (np .linalg .matmul (py_i_1d , py_i_1d ), np .int_ )
204+ assert_type (np .linalg .matmul (py_i_1d , py_b_1d ), np .int_ )
205+ assert_type (np .linalg .matmul (py_f_1d , py_f_1d ), np .float64 )
206+ assert_type (np .linalg .matmul (py_f_1d , py_i_1d ), np .float64 )
207+ assert_type (np .linalg .matmul (py_c_1d , py_c_1d ), np .complex128 )
208+ assert_type (np .linalg .matmul (py_b_1d , py_c_1d ), np .complex128 )
209+ assert_type (np .linalg .matmul (i8_nd , i8_nd ), Any )
210+ assert_type (np .linalg .matmul (f8_nd , f8_nd ), Any )
211+ assert_type (np .linalg .matmul (c16_nd , c16_nd ), Any )
0 commit comments