File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 6
6
# Out-of-place
7
7
lu_A = lu (A, pivot)
8
8
lu_DA = lu (DA, pivot)
9
- @test lu_DA isa LU{T,DMatrix{T},DVector{Int}}
10
- if ! (T in (Float32, ComplexF32, ComplexF64) ) # FIXME : NoPivot is unstable for FP32
9
+ @test lu_DA isa LU{T,DMatrix{T},DVector{Int}}
10
+ if ! (T in (Float32, ComplexF32)) && pivot == NoPivot ( ) # FIXME : NoPivot is unstable for FP32
11
11
@test lu_A. L ≈ lu_DA. L
12
12
@test lu_A. U ≈ lu_DA. U
13
13
end
14
- if ! (T in (ComplexF32, ComplexF64))
15
- @test lu_A. P ≈ lu_DA. P
16
- @test lu_A. p ≈ lu_DA. p
17
- end
14
+ @test lu_A. P ≈ lu_DA. P
15
+ @test lu_A. p ≈ lu_DA. p
18
16
# Check that lu did not modify A or DA
19
17
@test A ≈ DA ≈ B
20
18
23
21
lu_A = lu! (A_copy, pivot)
24
22
lu_DA = lu! (DA, pivot)
25
23
@test lu_DA isa LU{T,DMatrix{T},DVector{Int}}
26
- if ! (T in (Float32, ComplexF32, ComplexF64) ) # FIXME : NoPivot is unstable for FP32
24
+ if ! (T in (Float32, ComplexF32)) && pivot == NoPivot ( ) # FIXME : NoPivot is unstable for FP32
27
25
@test lu_A. L ≈ lu_DA. L
28
26
@test lu_A. U ≈ lu_DA. U
29
27
end
30
- if ! (T in (ComplexF32, ComplexF64))
31
- @test lu_A. P ≈ lu_DA. P
32
- @test lu_A. p ≈ lu_DA. p
33
- end
28
+ @test lu_A. P ≈ lu_DA. P
29
+ @test lu_A. p ≈ lu_DA. p
34
30
# Check that changes propagated to A
35
31
@test DA ≈ A
36
32
@test ! (B ≈ A)
You can’t perform that action at this time.
0 commit comments