Definition · applies to arrays · also called size (in MATLAB)

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

All definitions · All distinctions · All examples