bundles / scipy latest / scipy / fft / _pocketfft / helper / _init_nd_shape_and_axes
function
scipy.fft._pocketfft.helper:_init_nd_shape_and_axes
Signature
def _init_nd_shape_and_axes ( x , shape , axes ) Summary
Handle shape and axes arguments for N-D transforms.
Extended Summary
Returns the shape and axes in a standard form, taking into account negative values and checking for various potential errors.
Parameters
x: ndarrayThe input array.
shape: int or array_like of ints or NoneThe shape of the result. If both
shapeandaxes(see below) are None,shapeisx.shape; ifshapeis None butaxesis not None, thenshapeisnumpy.take(x.shape, axes, axis=0). Ifshapeis -1, the size of the corresponding dimension ofxis used.axes: int or array_like of ints or NoneAxes along which the calculation is computed. The default is over all axes. Negative indices are automatically converted to their positive counterparts.
Returns
shape: tupleThe shape of the result as a tuple of integers.
axes: listAxes along which the calculation is computed, as a list of integers.
Aliases
-
scipy.signal._signaltools._init_nd_shape_and_axes