NAME

width - return the size of the last axis of an array

SYNOPSIS

arr.width()

DESCRIPTION

The width() method returns a scalar containing the size of the last axis of an array. For a single-dimensional array, the length() and width(0 are identical. Although the width() intrinsic has an intuitive value for 2-dimensional array, it is also useful for arrays of higher rank.

RETURN VALUE

An Int which is the size of the last axis of an array

ERRORS

TypeCheck if arr is not an array
ArgCheck if any arguments are passed

EXAMPLE

    a = [3,4].iterate()
    a.width()
4

    "Hello".width()
5

    nil.width()
Illegal type

SEE ALSO

shape
rank
length
stride
sizeof