Skip to content

Commit

Permalink
Try fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Nov 14, 2024
1 parent cae9bfc commit 1f736ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/itensor.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using SparseArrays: SparseArrays, nnz
using NDTensors: NDTensors, nnz
using .TagSets: TagSets, hastags, replacetags

# Private inner constructor
Expand Down Expand Up @@ -853,7 +853,11 @@ hasqns(T::Union{Tensor,ITensor}) = hasqns(inds(T))

eachnzblock(T::ITensor) = eachnzblock(tensor(T))

SparseArrays.nnz(T::ITensor) = nnz(tensor(T))
# TODO: Switch this to `SparseArrays.nnz`, it is written
# this way for backwards compatibility since older versions
# of NDTensors had their own `NDTensors.nnz` function
# that didn't overload `SparseArrays.nnz`.
NDTensors.nnz(T::ITensor) = nnz(tensor(T))

nblocks(T::ITensor, args...) = nblocks(tensor(T), args...)

Expand Down

0 comments on commit 1f736ef

Please sign in to comment.