dimension ( matrix -- dimension )
Matrix operations

Prev:mdot ( m m -- m )
Next:transpose ( matrix -- newmatrix )


Vocabulary
math.matrices

Inputs
matrixa matrix


Outputs
dimensiona pair


Word description
Find the dimension of the input matrix, in the order of { rows cols }.

Notes
This word is intended for use with "flat" (2-dimensional) matrices.
Not to be confused with dimensionality, or the number of dimension scalars needed to describe a matrix.


Examples
USING: math.matrices prettyprint ; 4 30 1 <matrix> dimension .
{ 4 30 }


USING: math.matrices prettyprint ; { } dimension .
{ 0 0 }


Definition