Skip to content

Commit

Permalink
Fix some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 31, 2023
1 parent 766f945 commit 970b112
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions NDTensors/src/blocksparse/linearalgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ computed from the dense svds of seperate blocks.
"""
function svd(
T::Tensor{ElT,2,<:BlockSparse};
mindim=default_mindim(T),
min_blockdim=nothing,
mindim=nothing,
maxdim=nothing,
cutoff=nothing,
alg=default_svd_alg(T),
use_absolute_cutoff=default_use_absolute_cutoff(T),
use_relative_cutoff=default_use_relative_cutoff(T),
min_blockdim=0,
alg=nothing,
use_absolute_cutoff=nothing,
use_relative_cutoff=nothing,
) where {ElT}
truncate = !isnothing(maxdim) || !isnothing(cutoff)
maxdim = isnothing(maxdim) ? default_maxdim(T) : maxdim
cutoff = isnothing(cutoff) ? default_cutoff(T) : cutoff
min_blockdim = replace_nothing(min_blockdim, 0)

Us = Vector{DenseTensor{ElT,2}}(undef, nnzblocks(T))
Ss = Vector{DiagTensor{real(ElT),2}}(undef, nnzblocks(T))
Expand Down Expand Up @@ -208,7 +207,6 @@ function svd(
copyto!(blockview(V, blockV), Vb)
end
return U, S, V, Spectrum(d, truncerr)
#end # @timeit_debug
end

_eigen_eltypes(T::Hermitian{ElT,<:BlockSparseMatrix{ElT}}) where {ElT} = real(ElT), ElT
Expand Down

0 comments on commit 970b112

Please sign in to comment.