@@ -46,7 +46,7 @@ struct Axis{name,T}
4646 val:: T
4747end
4848# Constructed exclusively through Axis{:symbol}(...) or Axis{1}(...)
49- ( :: Type{ Axis{name}} ) (I:: T = ()) where {name,T} = Axis {name,T} (I)
49+ Axis {name} (I:: T = ()) where {name,T} = Axis {name,T} (I)
5050Base.:(== )(A:: Axis{name} , B:: Axis{name} ) where {name} = A. val == B. val
5151Base. hash (A:: Axis{name} , hx:: UInt ) where {name} = hash (A. val, hash (name, hx))
5252axistype (:: Axis{name,T} ) where {name,T} = T
@@ -146,7 +146,7 @@ A[ClosedInterval(0.,.3), [:a, :c]] # select an interval and two columns
146146struct AxisArray{T,N,D,Ax} <: AbstractArray{T,N}
147147 data:: D # D <:AbstractArray, enforced in constructor to avoid dispatch bugs (https://github.com/JuliaLang/julia/issues/6383)
148148 axes:: Ax # Ax<:NTuple{N, Axis}, but with specialized Axis{...} types
149- ( :: Type{ AxisArray{T,N,D,Ax}} ) (data:: AbstractArray{T,N} , axs:: Tuple{Vararg{Axis,N}} ) where {T,N,D,Ax} = new {T,N,D,Ax} (data, axs)
149+ AxisArray {T,N,D,Ax} (data:: AbstractArray{T,N} , axs:: Tuple{Vararg{Axis,N}} ) where {T,N,D,Ax} = new {T,N,D,Ax} (data, axs)
150150end
151151
152152# Helper functions: Default axis names (if not provided)
0 commit comments