numpy.flatnonzero()

numpy.flatnonzero(a) [source] Return indices that are non-zero in the flattened version of a. This is equivalent to a.ravel().nonzero()[0]. Parameters: a : ndarray Input array. Returns: res : ndarray Output array, containing the indices of the elements of a.ravel() that are non-zero. See also nonzero Return the indices of the non-zero elements of the input array. ravel Return a 1-D array containing the elements of the input array. Examples >>> x = np.arange(-2, 3) &

numpy.flatiter

class numpy.flatiter [source] Flat iterator object to iterate over arrays. A flatiter iterator is returned by x.flat for any array x. It allows iterating over the array as if it were a 1-D array, either in a for-loop or by calling its next method. Iteration is done in row-major, C-style order (the last index varying the fastest). The iterator can also be indexed using basic slicing or advanced indexing. See also ndarray.flat Return a flat iterator over an array. ndarray.flatten Retur

numpy.fix()

numpy.fix(x, y=None) [source] Round to nearest integer towards zero. Round an array of floats element-wise to nearest integer towards zero. The rounded values are returned as floats. Parameters: x : array_like An array of floats to be rounded y : ndarray, optional Output array Returns: out : ndarray of floats The array of rounded numbers See also trunc, floor, ceil around Round to given number of decimals Examples >>> np.fix(3.14) 3.0 >>> np.fix(3) 3.0 >&

numpy.finfo

class numpy.finfo [source] Machine limits for floating point types. Parameters: dtype : float, dtype, or instance Kind of floating point data-type about which to get information. See also MachAr The implementation of the tests that produce this information. iinfo The equivalent for integer data types. Notes For developers of NumPy: do not instantiate this at the module level. The initial calculation of these parameters is expensive and negatively impacts import times. These obje

numpy.find_common_type()

numpy.find_common_type(array_types, scalar_types) [source] Determine common type following standard coercion rules. Parameters: array_types : sequence A list of dtypes or dtype convertible objects representing arrays. scalar_types : sequence A list of dtypes or dtype convertible objects representing scalars. Returns: datatype : dtype The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind)

numpy.fill_diagonal()

numpy.fill_diagonal(a, val, wrap=False) [source] Fill the main diagonal of the given array of any dimensionality. For an array a with a.ndim > 2, the diagonal is the list of locations with indices a[i, i, ..., i] all identical. This function modifies the input array in-place, it does not return a value. Parameters: a : array, at least 2-D. Array whose diagonal is to be filled, it gets modified in-place. val : scalar Value to be written on the diagonal, its type must be compatible wit

numpy.fft.rfftn()

numpy.fft.rfftn(a, s=None, axes=None, norm=None) [source] Compute the N-dimensional discrete Fourier Transform for real input. This function computes the N-dimensional discrete Fourier Transform over any number of axes in an M-dimensional real array by means of the Fast Fourier Transform (FFT). By default, all axes are transformed, with the real transform performed over the last axis, while the remaining transforms are complex. Parameters: a : array_like Input array, taken to be real. s

numpy.fft.rfftfreq()

numpy.fft.rfftfreq(n, d=1.0) [source] Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft). The returned float array f contains the frequency bin centers in cycles per unit of the sample spacing (with zero at the start). For instance, if the sample spacing is in seconds, then the frequency unit is cycles/second. Given a window length n and a sample spacing d: f = [0, 1, ..., n/2-1, n/2] / (d*n) if n is even f = [0, 1, ..., (n-1)/2-1, (n-1)/2] / (d*

numpy.fft.rfft2()

numpy.fft.rfft2(a, s=None, axes=(-2, -1), norm=None) [source] Compute the 2-dimensional FFT of a real array. Parameters: a : array Input array, taken to be real. s : sequence of ints, optional Shape of the FFT. axes : sequence of ints, optional Axes over which to compute the FFT. norm : {None, ?ortho?}, optional New in version 1.10.0. Normalization mode (see numpy.fft). Default is None. Returns: out : ndarray The result of the real 2-D FFT. See also rfftn Compute the N-d

numpy.fft.rfft()

numpy.fft.rfft(a, n=None, axis=-1, norm=None) [source] Compute the one-dimensional discrete Fourier Transform for real input. This function computes the one-dimensional n-point discrete Fourier Transform (DFT) of a real-valued array by means of an efficient algorithm called the Fast Fourier Transform (FFT). Parameters: a : array_like Input array n : int, optional Number of points along transformation axis in the input to use. If n is smaller than the length of the input, the input is cr