@@ -36,7 +36,7 @@ for eltya in (Float32, Float64, Complex64, Complex128, BigFloat, Int)
36
36
if eltya <: BlasFloat
37
37
num = rand (eltya)
38
38
@test lu (num) == (one (eltya),num,1 )
39
- @test full (lufact (num)) ≈ eltya[num]
39
+ @test AbstractArray (lufact (num)) ≈ eltya[num]
40
40
end
41
41
for eltyb in (Float32, Float64, Complex64, Complex128, Int)
42
42
b = eltyb == Int ? rand (1 : 5 , n, 2 ) : convert (Matrix{eltyb}, eltyb <: Complex ? complex (breal, bimg) : breal)
@@ -68,7 +68,7 @@ debug && println("(Automatic) Square LU decomposition")
68
68
@test norm (a' * (lua' \ a' ) - a' , 1 ) < ε* κ* n^ 2
69
69
@test norm (a* (lua\ c) - c, 1 ) < ε* κ* n # c is a vector
70
70
@test norm (a' * (lua' \ c) - c, 1 ) < ε* κ* n # c is a vector
71
- @test full (lua) ≈ a
71
+ @test AbstractArray (lua) ≈ a
72
72
if eltya <: Real && eltyb <: Real
73
73
@test norm (a.' * (lua.' \ b) - b,1 ) < ε* κ* n* 2 # Two because the right hand side has two columns
74
74
@test norm (a.' * (lua.' \ c) - c,1 ) < ε* κ* n
@@ -81,13 +81,13 @@ debug && println("(Automatic) Square LU decomposition")
81
81
end
82
82
83
83
debug && println (" Tridiagonal LU" )
84
- κd = cond (full (d),1 )
84
+ κd = cond (Array (d),1 )
85
85
lud = lufact (d)
86
86
@test lufact (lud) == lud
87
87
@test_throws KeyError lud[:Z ]
88
- @test lud[:L ]* lud[:U ] ≈ lud[:P ]* full (d)
89
- @test lud[:L ]* lud[:U ] ≈ full (d)[lud[:p ],:]
90
- @test full (lud) ≈ d
88
+ @test lud[:L ]* lud[:U ] ≈ lud[:P ]* Array (d)
89
+ @test lud[:L ]* lud[:U ] ≈ Array (d)[lud[:p ],:]
90
+ @test AbstractArray (lud) ≈ d
91
91
f = zeros (eltyb, n+ 1 )
92
92
@test_throws DimensionMismatch lud\ f
93
93
@test_throws DimensionMismatch lud.' \ f
@@ -102,17 +102,17 @@ debug && println("Tridiagonal LU")
102
102
103
103
@test norm (d* (lud\ b) - b, 1 ) < ε* κd* n* 2 # Two because the right hand side has two columns
104
104
if eltya <: Real
105
- @test norm ((lud.' \ b) - full (d.' )\ b, 1 ) < ε* κd* n* 2 # Two because the right hand side has two columns
105
+ @test norm ((lud.' \ b) - Array (d.' )\ b, 1 ) < ε* κd* n* 2 # Two because the right hand side has two columns
106
106
end
107
107
if eltya <: Complex
108
- @test norm ((lud' \ b) - full (d' )\ b, 1 ) < ε* κd* n* 2 # Two because the right hand side has two columns
108
+ @test norm ((lud' \ b) - Array (d' )\ b, 1 ) < ε* κd* n* 2 # Two because the right hand side has two columns
109
109
end
110
110
end
111
111
end
112
112
if eltya <: BlasFloat && eltyb <: BlasFloat
113
113
e = rand (eltyb,n,n)
114
114
@test norm (e/ lud - e/ d,1 ) < ε* κ* n^ 2
115
- @test norm ((lud.' \ e' ) - full (d.' )\ e' ,1 ) < ε* κd* n^ 2
115
+ @test norm ((lud.' \ e' ) - Array (d.' )\ e' ,1 ) < ε* κd* n^ 2
116
116
# test singular
117
117
du = rand (eltya,n- 1 )
118
118
dl = rand (eltya,n- 1 )
@@ -136,11 +136,11 @@ end
136
136
137
137
# test conversion routine
138
138
a = Tridiagonal (rand (9 ),rand (10 ),rand (9 ))
139
- fa = full (a)
139
+ fa = Array (a)
140
140
falu = lufact (fa)
141
141
alu = lufact (a)
142
142
falu = convert (typeof (falu),alu)
143
- @test full (alu) == fa
143
+ @test AbstractArray (alu) == fa
144
144
145
145
# Test rational matrices
146
146
# # Integrate in general tests when more linear algebra is implemented in julia
0 commit comments