From 052db1b4204be3f49326353237b09cce588b7085 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sat, 17 Feb 2024 20:35:32 +1300 Subject: [PATCH] Update SparseAxisArray.jl --- src/Containers/SparseAxisArray.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Containers/SparseAxisArray.jl b/src/Containers/SparseAxisArray.jl index fec25027306..4c3c3fd852a 100644 --- a/src/Containers/SparseAxisArray.jl +++ b/src/Containers/SparseAxisArray.jl @@ -54,12 +54,13 @@ function SparseAxisArray( return SparseAxisArray(od, names) end -function SparseAxisArray(d::AbstractDict{K,T}) where {T,N,K<:NTuple{N,Any}} +function SparseAxisArray( + d::AbstractDict{K,T}, + ::Nothing = nothing, +) where {T,N,K<:NTuple{N,Any}} return SparseAxisArray(d, ntuple(n -> Symbol("#$n"), N)) end -SparseAxisArray(d::AbstractDict, ::Nothing) = SparseAxisArray(d) - Base.length(sa::SparseAxisArray) = length(sa.data) Base.IteratorSize(::Type{<:SparseAxisArray}) = Base.HasLength()