Next: shift3, Previous: sgn, Up: Internal Routines [Contents][Index]

`shift(`

`data` [[, `axes`], `dist`, blank=`blank`] [,
/translate])

`shift, `

`data` [[, `axes`], `dist`, blank=`blank`]
[, /translate]

Shifts the data in array

over the integer numbers of
elements in `data`

. If `dist`

or
`blank``/translate`

are specified, then the data is shifted
non-cyclically: values that are shifted beyond an edge of the original
array are lost, and the value of

, or zero by default,
is inserted for values that are shifted in from beyond the opposite
edge. If neither `blank`

nor `blank``/translate`

are
specified, then the data is shifted cyclically: data that shifts beyond
one edge will appear at the opposite edge, and no data values are lost.

specifies along which dimensions must be shifted over
the amount given by the corresponding element of `axes`

.
`dist`

If

is not specified, then `dist``dimen(`

is assumed for it. If `data`)/2

is not specified, then
`axes``indgen(`

is assumed for it.
`dist`)

The function form returns the shifted data; the subroutine form modifies

.
`data`