@@ -60,8 +60,8 @@ def case_complex2D(self, N=64, b0range=(-300, 300), t2svalue=15.0):
6060@_param_array_interface_np_cp
6161@parametrize_with_cases ("b0_map, r2s_map, mask" , cases = CasesB0maps )
6262@parametrize ("method" , ["svd-full" , "mti" , "mfi" ])
63- @parametrize ("L" , [40 , - 1 ])
64- def test_b0map_coeff (b0_map , r2s_map , mask , method , L , array_interface ):
63+ @parametrize ("L, lazy " , [( 40 , True ), ( - 1 , True ), ( 40 , False ) ])
64+ def test_b0map_coeff (b0_map , r2s_map , mask , method , L , lazy , array_interface ):
6565 """Test exponential approximation for B0 field only."""
6666 # Generate readout times
6767 Nt = 400
@@ -80,7 +80,7 @@ def test_b0map_coeff(b0_map, r2s_map, mask, method, L, array_interface):
8080 to_interface (tread , array_interface ),
8181 to_interface (mask , array_interface ),
8282 L = L ,
83- lazy = False ,
83+ lazy = lazy ,
8484 n_bins = 4096 ,
8585 ** kwargs ,
8686 )
@@ -92,6 +92,8 @@ def test_b0map_coeff(b0_map, r2s_map, mask, method, L, array_interface):
9292 assert B .shape == (Nt , L )
9393 assert C .shape == (L , * b0_map .shape )
9494
95+ if lazy :
96+ C = np .stack ([C [l ] for l in range (len (C ))])
9597 # Check that the approximation match the full matrix.
9698 B = from_interface (B , array_interface )
9799 C = from_interface (C , array_interface )
0 commit comments