Jutho/TensorKit.jl

`similar_from_structure` always call `fill!` which is not need for `bitstype`

jemiryguo opened this issue · 0 comments

In tensorcache.jl around line 9

function similar_from_structure(A, T, structure)
    if isbits(T)
        similar(A, T, structure)
    else
        fill!(similar(A, T, structure), zero(T)) # this fixes BigFloat issues
    end
end

T is a Type, isbits(T::Type) always return false. Maybe isbitstype should be used?