File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ function dimmatch end
2525`Size` is used extensively throughout the `StaticArrays` API to describe _compile-time_
2626knowledge of the size of an array. The dimensions are stored as a type parameter and are
2727statically propagated by the compiler, resulting in efficient, type-inferrable code. For
28- example, to create a static matrix of zeros, use `zeros(Size(3,3))` (rather than
29- `zeros(3,3)`, which constructs a `Base.Array`).
28+ example, to create a static matrix of zeros, use `A = zeros(SMatrix{3,3})`. The static
29+ size of `A` can be obtained by `Size(A)`. (rather than `size(zeros(3,3))`, which returns
30+ `Base.Tuple{2,Int}`).
3031
3132Note that if dimensions are not known statically (e.g., for standard `Array`s),
3233[`Dynamic()`](@ref) should be used instead of an `Int`.
You can’t perform that action at this time.
0 commit comments