MCPcopy Create free account
hub / github.com/numpy/numpy / _cook_nd_args

Function _cook_nd_args

numpy/fft/_pocketfft.py:682–698  ·  view source on GitHub ↗
(a, s=None, axes=None, invreal=0)

Source from the content-addressed store, hash-verified

680
681
682def _cook_nd_args(a, s=None, axes=None, invreal=0):
683 if s is None:
684 shapeless = 1
685 if axes is None:
686 s = list(a.shape)
687 else:
688 s = take(a.shape, axes)
689 else:
690 shapeless = 0
691 s = list(s)
692 if axes is None:
693 axes = list(range(-len(s), 0))
694 if len(s) != len(axes):
695 raise ValueError("Shape and axes have different lengths.")
696 if invreal and shapeless:
697 s[-1] = (a.shape[axes[-1]] - 1) * 2
698 return s, axes
699
700
701def _raw_fftnd(a, s=None, axes=None, function=fft, norm=None):

Callers 3

_raw_fftndFunction · 0.85
rfftnFunction · 0.85
irfftnFunction · 0.85

Calls 1

takeFunction · 0.90

Tested by

no test coverage detected