We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
oneunit
unitspace
1 parent 313df53 commit bd97efdCopy full SHA for bd97efd
src/tensors/diagonal.jl
@@ -306,7 +306,7 @@ function LinearAlgebra.pinv(d::DiagonalTensorMap; kwargs...)
306
if iszero(atol)
307
rtol = get(kwargs, :rtol, zero(real(T)))
308
else
309
- rtol = sqrt(eps(real(float(oneunit(T))))) * length(d.data)
+ rtol = sqrt(eps(real(float(unitspace(T))))) * length(d.data)
310
end
311
pdata = let tol = max(atol, rtol * maximum(abs, d.data))
312
map(x -> abs(x) < tol ? zero(x) : pinv(x), d.data)
0 commit comments