@@ -4209,39 +4209,57 @@ def is_permutation(P):
4209
4209
4210
4210
def check_fflu (A ):
4211
4211
m , n = shape (A )
4212
+ print ('a' )
4212
4213
P , L , D , U = A .fflu ()
4214
+ print ('b' )
4213
4215
Dq = QQ (D )
4214
4216
assert P * A == L * Dq .inv ()* U
4215
4217
assert shape (P ) == shape (L ) == shape (D ) == (m , m )
4216
4218
assert shape (A ) == shape (U ) == (m , n )
4217
4219
assert is_permutation (P )
4220
+ print ('c' )
4218
4221
assert L .is_lower_triangular ()
4222
+ print ('d' )
4219
4223
assert U .is_upper_triangular ()
4224
+ print ('e' )
4220
4225
assert D .is_diagonal ()
4226
+ print ('f' )
4221
4227
4222
4228
for M , S , is_field in _all_matrices ():
4223
4229
# XXX: Add this to more matrix types...
4224
4230
if M is not flint .fmpz_mat :
4225
4231
continue
4226
4232
4233
+ print (0 )
4227
4234
A = M ([[1 , 2 ], [3 , 4 ]])
4228
4235
P , L , D , U = A .fflu ()
4229
4236
assert P == M ([[1 , 0 ], [0 , 1 ]])
4230
4237
assert L == M ([[1 , 0 ], [3 , - 2 ]])
4231
4238
assert D == M ([[1 , 0 ], [0 , - 2 ]])
4232
4239
assert U == M ([[1 , 2 ], [0 , - 2 ]])
4233
4240
4241
+ print (1 )
4234
4242
check_fflu (M (0 , 0 , []))
4243
+ print (2 )
4235
4244
check_fflu (M (2 , 0 , []))
4245
+ print (3 )
4236
4246
check_fflu (M (0 , 2 , []))
4247
+ print (4 )
4237
4248
check_fflu (M ([[1 ]]))
4238
4249
4250
+ print (5 )
4239
4251
check_fflu (M ([[1 , 2 ], [3 , 4 ]]))
4252
+ print (6 )
4240
4253
check_fflu (M ([[1 , 2 , 3 ], [4 , 5 , 6 ]]))
4254
+ print (7 )
4241
4255
check_fflu (M ([[1 , 2 ], [3 , 4 ], [5 , 6 ]]))
4256
+ print (8 )
4242
4257
check_fflu (M ([[1 , 2 ], [2 , 4 ]]))
4258
+ print (9 )
4243
4259
check_fflu (M ([[0 , 0 ], [0 , 0 ]]))
4260
+ print (10 )
4244
4261
check_fflu (M ([[1 , 1 , 1 ], [1 , 1 , 1 ]]))
4262
+ print (11 )
4245
4263
4246
4264
for _ in range (10 ):
4247
4265
for m in range (1 , 5 ):
0 commit comments