NAME

drop - return the suffix of an array

SYNOPSIS

arr.drop(spec)
arr.drop(spec, axis)

DESCRIPTION

Returns the suffix of an array. The suffix is the remainder of the array after the first spec items are removed from the specified axis (or the last axis, if not specified). Similar to APL specarr and spec ↓[axis] arr. Either spec or axis or both may be a vector indicating the count and axis specification to be dropped. They must be conformable with each other. Note that the suffix is actually a prefix if spec is less than zero.

The axis follows axis specification rules.

RETURN VALUE

A sub-array suffix of the given arr

ERRORS

ArgCheck if an incorrect number of argument is given
RangeCheck if the arr is a scalar
RangeCheck if axis is out-of-range of the rank of the arr
RangeCheck if spec is greater than the length of the given axis
ShapeCheck if spec and axis are not conformable

EXAMPLE

    a = [3,3].iterate()
    a
0 1 2
3 4 5
6 7 8

    a.drop(1)
3 4 5
6 7 8

    a.drop(1,1)
1 2
4 5
7 8

    a.drop(1,2)
Value out of range

    a.drop({1,1})
4 5
7 8

    a.drop(-1)
0 1 2
3 4 5

SEE ALSO

take