File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ function dimmatch end
25
25
`Size` is used extensively throughout the `StaticArrays` API to describe _compile-time_
26
26
knowledge of the size of an array. The dimensions are stored as a type parameter and are
27
27
statically 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}`).
30
31
31
32
Note that if dimensions are not known statically (e.g., for standard `Array`s),
32
33
[`Dynamic()`](@ref) should be used instead of an `Int`.
You can’t perform that action at this time.
0 commit comments