Skip to content

Commit 1084853

Browse files
committed
formatter
1 parent 96630e5 commit 1084853

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/auxiliary/deprecate.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import Base: transpose
22

3+
#! format: off
4+
35
for f in (:rand, :randn, :zeros, :ones)
46
@eval begin
57
Base.@deprecate TensorMap(::typeof($f), T::Type, P::HomSpace) $f(T, P)

src/tensors/factorizations/matrixalgebrakit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ for f in
44
[:svd_compact, :svd_full, :svd_trunc, :svd_vals, :qr_compact, :qr_full, :qr_null,
55
:lq_compact, :lq_full, :lq_null, :eig_full, :eig_trunc, :eig_vals, :eigh_full,
66
:eigh_trunc, :eigh_vals, :left_polar, :right_polar]
7-
f! = Symbol(f, :!)
7+
f! = Symbol(f, :!)
88
@eval function default_algorithm(::typeof($f!), ::Type{T};
99
kwargs...) where {T<:AbstractTensorMap}
1010
return default_algorithm($f!, blocktype(T); kwargs...)

test/factorizations.jl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ for V in spacelist
177177
v, c = @constinferred left_orth(t; kind=:svd)
178178
@test v * c t
179179
@test isisometry(v)
180-
180+
181181
N = @constinferred left_null(t; kind=:svd)
182182
@test isisometry(N)
183183
@test norm(N' * t) 0 atol = 100 * eps(norm(t))
184-
184+
185185
Nᴴ = @constinferred right_null(t; kind=:svd)
186186
@test isisometry(Nᴴ; side=:right)
187187
@test norm(t * Nᴴ') 0 atol = 100 * eps(norm(t))
@@ -204,12 +204,12 @@ for V in spacelist
204204
for T in eltypes, t in (rand(T, V1, V1), rand(T, W, W), rand(T, W, W)')
205205
d, v = @constinferred eig_full(t)
206206
@test t * v v * d
207-
207+
208208
d′ = LinearAlgebra.diag(d)
209209
for (c, b) in LinearAlgebra.eigvals(t)
210210
@test sort(b; by=abs) sort(d′[c]; by=abs)
211211
end
212-
212+
213213
vdv = v' * v
214214
vdv = (vdv + vdv') / 2
215215
@test @constinferred isposdef(vdv)
@@ -218,8 +218,7 @@ for V in spacelist
218218
d, v = @constinferred eig_trunc(t; trunc=truncrank(dim(domain(t)) ÷ 2))
219219
@test t * v v * d
220220
@test dim(domain(d)) dim(domain(t)) ÷ 2
221-
222-
221+
223222
t2 = (t + t')
224223
D, V = eigen(t2)
225224
@test isisometry(V)
@@ -232,13 +231,13 @@ for V in spacelist
232231
@test isposdef(t2) == isposdef(λ)
233232
@test isposdef(t2 - λ * one(t2) + 0.1 * one(t2))
234233
@test !isposdef(t2 - λ * one(t2) - 0.1 * one(t2))
235-
234+
236235
add!(t, t')
237236

238237
d, v = @constinferred eigh_full(t)
239238
@test t * v v * d
240239
@test isunitary(v)
241-
240+
242241
λ = minimum(minimum(real(LinearAlgebra.diag(b))) for (c, b) in blocks(d))
243242
@test cond(v) one(real(T))
244243
@test isposdef(t) == isposdef(λ)
@@ -250,7 +249,7 @@ for V in spacelist
250249
@test dim(domain(d)) dim(domain(t)) ÷ 2
251250
end
252251
end
253-
252+
254253
@testset "Condition number and rank" begin
255254
for T in eltypes,
256255
t in (rand(T, W, W), rand(T, W, W)',
@@ -268,7 +267,7 @@ for V in spacelist
268267
u = unitary(T, V1 V2, V1 V2)
269268
@test @constinferred(cond(u)) one(real(T))
270269
@test @constinferred(rank(u)) == dim(V1 V2)
271-
270+
272271
t = rand(T, zero(V1), W)
273272
@test rank(t) == 0
274273
t2 = rand(T, zero(V1) * zero(V2), zero(V1) * zero(V2))

0 commit comments

Comments
 (0)