Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Jun 23, 2024
1 parent 2534af2 commit 8bf0c4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NDTensors/src/blocksparse/blocksparsetensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ end
# and takes advantage of block sparsity. Once the more general
# case handles block sparsity, this can be removed.
function Base.mapreduce(f, op, t::BlockSparseTensor; kwargs...)
if !iszero(f(zero(eltype(t))))
elt = eltype(t)
if !iszero(f(zero(elt)))
return mapreduce(f, op, array(t); kwargs...)
end
if length(t) > nnz(t)
Expand Down

0 comments on commit 8bf0c4e

Please sign in to comment.