You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There need to be examples for subtyping AbstractIndicesArray. A neat example might be how to recreate the SArray using static axes instead of a statically defined size.
Here's some very brief code that would illustrate this...
""" AxisMArrayAn array whose elements are mutable."""struct AxisMArray{T,N,Axs<:Tuple} <:AbstractAxisArray{T,N,Axs}
data::Vector{T}
axes::LinearAxes{N,Axs}functionAxisMArray{T,N,Axs}(data::Vector{T}, axes::Axs) where {T,N,Axs}
returnnew{T,N,Axs}(data, axes)
endend""" AxisIArrayAn array elements are immutable."""struct AxisIArray{T,N,Axs<:Tuple,L} <:AbstractAxisArray{T,N,Axs}
data::SVector{L,T}
axes::LinearAxes{N,Axs}functionAxisIArray{T,N,Axs,L}(data::SVector{L,T}, axes::Axs) where {T,N,Axs,L}
returnnew{T,N,Axs,L}(data, axes)
endend
The text was updated successfully, but these errors were encountered:
There need to be examples for subtyping
AbstractIndicesArray
. A neat example might be how to recreate the SArray using static axes instead of a statically defined size.Here's some very brief code that would illustrate this...
The text was updated successfully, but these errors were encountered: