@@ -46,7 +46,7 @@ struct Axis{name,T}
46
46
val:: T
47
47
end
48
48
# 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)
50
50
Base.:(== )(A:: Axis{name} , B:: Axis{name} ) where {name} = A. val == B. val
51
51
Base. hash (A:: Axis{name} , hx:: UInt ) where {name} = hash (A. val, hash (name, hx))
52
52
axistype (:: Axis{name,T} ) where {name,T} = T
@@ -146,7 +146,7 @@ A[ClosedInterval(0.,.3), [:a, :c]] # select an interval and two columns
146
146
struct AxisArray{T,N,D,Ax} <: AbstractArray{T,N}
147
147
data:: D # D <:AbstractArray, enforced in constructor to avoid dispatch bugs (https://github.com/JuliaLang/julia/issues/6383)
148
148
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)
150
150
end
151
151
152
152
# Helper functions: Default axis names (if not provided)
0 commit comments