Skip to content

Commit b114f64

Browse files
committed
avoid one call in rank of tensormap
1 parent 6e990e2 commit b114f64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tensors/linalg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ function LinearAlgebra.rank(
296296
t::AbstractTensorMap;
297297
atol::Real = 0, rtol::Real = atol > 0 ? 0 : _default_rtol(t)
298298
)
299-
r = dim(one(sectortype(t))) * 0
299+
r = zero(real(sectorscalartype(sectortype(t))))
300300
dim(t) == 0 && return r
301301
S = LinearAlgebra.svdvals(t)
302302
tol = max(atol, rtol * maximum(first, values(S)))

0 commit comments

Comments
 (0)