File tree Expand file tree Collapse file tree 1 file changed +24
-26
lines changed Expand file tree Collapse file tree 1 file changed +24
-26
lines changed Original file line number Diff line number Diff line change 142
142
@test apinv isa Vector{eltya}
143
143
end
144
144
end
145
- end
146
145
147
- @testset " zero valued numbers/vectors/matrices" begin
148
- @testset for eltya in (Float32, Float64, Complex64, Complex128)
146
+ @testset " zero valued numbers/vectors/matrices" begin
149
147
a = pinv (zero (eltya))
150
148
@test a ≈ 0.0
151
149
@@ -161,29 +159,29 @@ end
161
159
@test a. diag[1 ] ≈ 0.0
162
160
@test a. diag[2 ] ≈ 0.0
163
161
end
164
- end
165
162
166
- @testset " sub-normal numbers/vectors/matrices" begin
167
- @testset for eltya in (Float32, Float64)
168
- a = pinv (realmin (eltya)/ 100 )
169
- @test a ≈ 0.0
170
- # Complex subnormal
171
- a = pinv (realmin (eltya)/ 100 * (1 + 1im ))
172
- @test a ≈ 0.0
173
-
174
- a = pinv ([realmin (eltya); realmin (eltya)]/ 100 )
175
- @test a[1 ] ≈ 0.0
176
- @test a[2 ] ≈ 0.0
177
- # Complex subnormal
178
- a = pinv ([realmin (eltya); realmin (eltya)]/ 100 * (1 + 1im ))
179
- @test a[1 ] ≈ 0.0
180
- @test a[2 ] ≈ 0.0
181
- a = pinv (Diagonal ([realmin (eltya); realmin (eltya)]/ 100 ))
182
- @test a. diag[1 ] ≈ 0.0
183
- @test a. diag[2 ] ≈ 0.0
184
- # Complex subnormal
185
- a = pinv (Diagonal ([realmin (eltya); realmin (eltya)]/ 100 * (1 + 1im )))
186
- @test a. diag[1 ] ≈ 0.0
187
- @test a. diag[2 ] ≈ 0.0
163
+ if eltya <: Base.LinAlg.BlasReal
164
+ @testset " sub-normal numbers/vectors/matrices" begin
165
+ a = pinv (realmin (eltya)/ 100 )
166
+ @test a ≈ 0.0
167
+ # Complex subnormal
168
+ a = pinv (realmin (eltya)/ 100 * (1 + 1im ))
169
+ @test a ≈ 0.0
170
+
171
+ a = pinv ([realmin (eltya); realmin (eltya)]/ 100 )
172
+ @test a[1 ] ≈ 0.0
173
+ @test a[2 ] ≈ 0.0
174
+ # Complex subnormal
175
+ a = pinv ([realmin (eltya); realmin (eltya)]/ 100 * (1 + 1im ))
176
+ @test a[1 ] ≈ 0.0
177
+ @test a[2 ] ≈ 0.0
178
+ a = pinv (Diagonal ([realmin (eltya); realmin (eltya)]/ 100 ))
179
+ @test a. diag[1 ] ≈ 0.0
180
+ @test a. diag[2 ] ≈ 0.0
181
+ # Complex subnormal
182
+ a = pinv (Diagonal ([realmin (eltya); realmin (eltya)]/ 100 * (1 + 1im )))
183
+ @test a. diag[1 ] ≈ 0.0
184
+ @test a. diag[2 ] ≈ 0.0
185
+ end
188
186
end
189
187
end
You can’t perform that action at this time.
0 commit comments