From f020d35a889aab9d766d889f3e8390f29c7dca26 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Sat, 26 Jun 2021 12:25:24 -0400 Subject: [PATCH 1/3] Add AxisMatrix alias for consistency with `AbstractArray` and `AbstractMatrix` and other such types --- src/core.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core.jl b/src/core.jl index 190152a..cd2e856 100644 --- a/src/core.jl +++ b/src/core.jl @@ -178,6 +178,12 @@ struct AxisArray{T,N,D,Ax} <: AbstractArray{T,N} 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) end +""" + AxisMatrix{T} +Alias for [`AxisArray{T,2,D,Ax}`](@ref). +""" +const AxisMatrix{T,D,Ax} = AxisArray{T,2,D,Ax} + # Helper functions: Default axis names (if not provided) @inline _defaultdimname(i) = i == 1 ? (:row) : i == 2 ? (:col) : i == 3 ? (:page) : i == 4 ? :dim_4 : Symbol(:dim_, i) From 6a26b33a3cbd82ea230fd272e4e1088e2c00bc1e Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Sun, 25 Jul 2021 12:06:57 -0400 Subject: [PATCH 2/3] Update src/core.jl Co-authored-by: Johnny Chen --- src/core.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.jl b/src/core.jl index cd2e856..3aee9c4 100644 --- a/src/core.jl +++ b/src/core.jl @@ -180,7 +180,7 @@ end """ AxisMatrix{T} -Alias for [`AxisArray{T,2,D,Ax}`](@ref). +Alias for [`AxisArray{T,2,D,Ax}`](@ref AxisArray). """ const AxisMatrix{T,D,Ax} = AxisArray{T,2,D,Ax} From 3a76035d224c4b9d731da033c78c5d064db7027d Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Sun, 25 Jul 2021 12:31:27 -0400 Subject: [PATCH 3/3] Update src/core.jl --- src/core.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core.jl b/src/core.jl index 3aee9c4..31c26f4 100644 --- a/src/core.jl +++ b/src/core.jl @@ -183,6 +183,7 @@ end Alias for [`AxisArray{T,2,D,Ax}`](@ref AxisArray). """ const AxisMatrix{T,D,Ax} = AxisArray{T,2,D,Ax} +const AxisVector{T,D,Ax} = AxisArray{T,1,D,Ax} # Helper functions: Default axis names (if not provided) @inline _defaultdimname(i) = i == 1 ? (:row) : i == 2 ? (:col) : i == 3 ? (:page) : i == 4 ? :dim_4 : Symbol(:dim_, i)