FixedSizeArrays.jl is a package for the Julia programming language which implements mutable fixed-size arrays: arrays whose size is set once, at construction, and cannot change afterwards.
The size can be fixed at two different stages:
- at runtime, with
FixedSizeArray: the size is a constant field of the array, so arrays of all sizes share the same type and compiled code, and the compiler can constant-propagate it when it is known at compile time; - at compile time, dimension by dimension, with
FixedSizeArrays.FixedSizeArrayDims: each dimension can be static, a compile-time constant which is part of the type, or dynamic, anIntstored in the array. Static dimensions areVals, orStaticInts from the Static.jl package, a weak dependency.
FixedSizeArray is an alias for FixedSizeArrayDims with all dimensions dynamic, so everything which works for a FixedSizeArray also works for an array with static dimensions.
FixedSizeArrays supports the standard array interfaces, so things like broadcasting, matrix multiplication, other linear algebra operations, similar, copyto! or map should just work.
Find more in the manual:
- FixedSizeArrays.jl: What Array probably should have been, talk at JuliaCon '25 by Mosè Giordano, Oscar Smith, and Neven Sajko.