Skip to content

Commit

Permalink
Update NDTensors/src/lib/SparseArrayDOKs/src/sparsearraydok.jl
Browse files Browse the repository at this point in the history
Avoid where syntax

Co-authored-by: Matt Fishman <[email protected]>
  • Loading branch information
emstoudenmire and mtfishman authored May 14, 2024
1 parent c952653 commit aba62fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NDTensors/src/lib/SparseArrayDOKs/src/sparsearraydok.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct SparseArrayDOK{T,N,Zero} <: AbstractSparseArray{T,N}
end

# Constructors
function SparseArrayDOK(data, dims::NTuple{N,Int}, zero) where {N}
return SparseArrayDOK{eltype(data),N,typeof(zero)}(data, dims, zero)
function SparseArrayDOK(data, dims::Tuple{Vararg{Int}}, zero)
return SparseArrayDOK{eltype(data),length(dims),typeof(zero)}(data, dims, zero)
end

function SparseArrayDOK{T,N,Zero}(dims::Tuple{Vararg{Int}}, zero) where {T,N,Zero}
Expand Down

0 comments on commit aba62fd

Please sign in to comment.