@@ -160,7 +160,8 @@ def test_bandwidth(self, dtype, rng):
160
160
A = np .asarray ([np .triu (A , k ) for k in range (- 3 , 3 )]).reshape ((2 , 3 , 4 , 4 ))
161
161
self .batch_test (linalg .bandwidth , A , n_out = 2 )
162
162
163
- @pytest .mark .parametrize ('fun_n_out' , [(linalg .cholesky , 1 ), (linalg .ldl , 3 )])
163
+ @pytest .mark .parametrize ('fun_n_out' , [(linalg .cholesky , 1 ), (linalg .ldl , 3 ),
164
+ (linalg .cho_factor , 2 )])
164
165
@pytest .mark .parametrize ('dtype' , floating )
165
166
def test_ldl_cholesky (self , fun_n_out , dtype , rng ):
166
167
fun , n_out = fun_n_out
@@ -286,3 +287,10 @@ def test_rsf2cs(self, dtype, rng):
286
287
A = get_random ((2 , 3 , 4 , 4 ), dtype = dtype , rng = rng )
287
288
T , Z = linalg .schur (A )
288
289
self .batch_test (linalg .rsf2csf , (T , Z ), n_out = 2 )
290
+
291
+ @pytest .mark .parametrize ('dtype' , floating )
292
+ def test_cholesky_banded (self , dtype , rng ):
293
+ ab = get_random ((5 , 4 , 3 , 6 ), dtype = dtype , rng = rng )
294
+ ab [..., 0 , 0 ] = 0
295
+ ab [..., - 1 , :] = 10 # make diagonal dominant
296
+ self .batch_test (linalg .cholesky_banded , ab )
0 commit comments