API
Shapes.AbstractShape
— Typeabstract type AbstractShape{S, T, N, L} end
The supertype for the various concrete shapes defined by Shapes
. The,/StaticArrays.jl). The S
parameter is a Tuple
-type specifying the dimensions, or size, of the AbstractShape
- such as Tuple{3,4,5}
for a 3×4×5-sized array. The T
parameter specifies the underlying data type of the shape (e.g. the element type for an array shape). The L
parameter is the length of the array and is always equal to prod(S)
. Constructors may drop the L
and T
parameters if they are inferrable from the input (e.g. L
is always inferrable from S
).
Shapes.checkaxes
— Methodcheckaxes(shape::AbstractShape, x)
Throws an error if axes(shape) != axes(x)
`.
Shapes.checkaxes
— Methodcheckaxes(Bool, shape::AbstractShape, x)
Return true
if axes(shape) == axes(x)
`.
Shapes.checksize
— Methodchecksize(shape::AbstractShape, x)
Throws an error if size(shape) != size(x)
.
Shapes.checksize
— Methodchecksize(Bool, shape::AbstractShape, x)
Return true
if size(shape) == size(x)
.