KPG1_MANIx

Copies a data array with axis permutation and expansion

Description:

An input array is copied to an output array under control of a supplied AXES vector. Axes of the output array may be in a different order to those of the input array, and it may be required to expand along a new dimension or collapse along an existing combination (being replaced by the mean of all non-bad values).

Invocation

CALL KPG1_MANIx( NDIMI, DIMI, IN, NDIMO, DIMO, AXES, COLOFF, EXPOFF, OUT, STATUS )

Arguments

NDIMI = INTEGER (Given)
The dimensionality of the input array.
DIMI( NDIMI ) = INTEGER (Given)
The shape of the input array.
IN( ) = ? (Given)
The input data array, vectorised. The number of elements is given by the product of the elements of DIMI.
NDIMO = INTEGER (Given)
The dimensionality of the output array (the number of elements in AXES).
DIMO( NDIMO ) = INTEGER (Given)
The dimensions of the output array. Information about the extent of the expanded dimesions, as well as information implicit in DIMI and AXES, is held here.
AXES( NDIMO ) = INTEGER (Given)
An array determining how the output array is copied from the input array. The I th element determines the source of the I th dimension of the output array. If it is zero, a new dimension will grow there. Otherwise, it gives the index of a dimension of the input array to copy.
COLOFF( ) = INTEGER (Returned)
Workspace. This array must have at least as many elements as the product of all the dimensions of the input array along which it is to be collapsed; that is the product of each element of DIMI whose index does not appear in AXES.
EXPOFF( ) = INTEGER (Returned)
Workspace. This array must have at least as many elements as the product of all the newly expanded dimensions in the output array; that is the product of each element of DIMO for which the corresponding element of AXES is zero.
OUT( ) = ? (Returned)
The output array, vectorised. The number of elements written is given by the product of the elements of NDIMO.
STATUS = INTEGER (Given)
The global status

Notes: