{ } Raw JSON

bundles / scipy 1.18.0 / scipy / fft / _duccfft / helper / _init_nd_shape_and_axes

function

scipy.fft._duccfft.helper:_init_nd_shape_and_axes

source: /scipy/fft/_duccfft/helper.py:47

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 : ndarray

The input array.

shape : int or array_like of ints or None

The shape of the result. If both shape and axes (see below) are None, shape is x.shape; if shape is None but axes is not None, then shape is numpy.take(x.shape, axes, axis=0). If shape is -1, the size of the corresponding dimension of x is used.

axes : int or array_like of ints or None

Axes along which the calculation is computed. The default is over all axes. Negative indices are automatically converted to their positive counterparts.

Returns

shape : tuple

The shape of the result as a tuple of integers.

axes : list

Axes along which the calculation is computed, as a list of integers.

Aliases

  • scipy.signal._signaltools._init_nd_shape_and_axes