Shape of an array
High school
Consider an array of numbers, which has some length in each direction. The shape of the array is the list of those lengths.
Undergraduate (programming)
Consider an array with one or more axes. The shape of the array is the tuple of its lengths along each axis.
Examples
Worked examples
- The $3 \times 3$ identity matrix : $(3, 3)$ High school