Skip to content

Commit 83e3280

Browse files
authored
Add AxisMatrix alias (#199)
1 parent 28e9beb commit 83e3280

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ struct AxisArray{T,N,D,Ax} <: AbstractArray{T,N}
178178
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)
179179
end
180180

181+
"""
182+
AxisMatrix{T}
183+
Alias for [`AxisArray{T,2,D,Ax}`](@ref AxisArray).
184+
"""
185+
const AxisMatrix{T,D,Ax} = AxisArray{T,2,D,Ax}
186+
const AxisVector{T,D,Ax} = AxisArray{T,1,D,Ax}
187+
181188
# Helper functions: Default axis names (if not provided)
182189
@inline _defaultdimname(i) = i == 1 ? (:row) : i == 2 ? (:col) : i == 3 ? (:page) : i == 4 ? :dim_4 : Symbol(:dim_, i)
183190

0 commit comments

Comments
 (0)