HELP ARRAY_TRANSPOSE                            David Young, March 2001
                                                revised Oct 2001


LIB *array_transpose provides a procedure for obtaining the transpose of
a region of a two-dimensional array.

array_transpose(arrin, regionin, arrout) -> arrout
        The first argument, arrin, must be a 2-D array. Arrays of packed
        floats (as returned by *newsfloatarray) and packed bytes (as
        returned by *newbytearray) are handled more efficiently than
        other types, provided that they are arrayed "by row".

        regionin may be <false>, in which case data is taken from the
        whole of arrin. Otherwise, regionin must  specify, in
        *boundslist  form, the region of array from which  data are to
        be taken.

        Suppose regionin (or the boundslist of arrin if regionin is
        false) has the form [x0 x1 y0 y1]. If arrout is an array on
        entry, it must contain the region [y0 y1 x0 x1], and data is
        written to this region. If arrin is one of the special types of
        array mentioned above, then for efficiency arrout should be the
        same type. arrout and arrin may not be the same array or have
        the same arrayvector.

        If arrout is <false> on entry, a new array of the same type as
        arrin and with bounds [y0 y1 x0 x1] is created and returned.

        If arrout is not an array and not <false> on entry, a recyclable
        array, as produced by oldanyarray (see *oldarray) is created and
        returned, using arrout as the tag. This can reduce garbage
        creation when temporary arrays are used in a procedure. The
        output array has the same type as arrin and the bounds [y0 y1 x0
        x1].

        On exit from the procedure, arrout(y, x) = arrin(x, y) for all x
        and y such that x0 <= x <= x1 and y0 <= y <= y1.


--- $popvision/help/array_transpose
--- Copyright University of Sussex 2001. All rights reserved.
