NumpyFFTWBackend#

class NumpyFFTWBackend(array_backend=<module 'numpy' from '/usr/local/lib/python3.11/site-packages/numpy/__init__.py'>, float_dtype=<class 'numpy.float32'>, complex_dtype=<class 'numpy.complex64'>, int_dtype=<class 'numpy.int32'>, overflow_safe_dtype=<class 'numpy.float32'>, **kwargs)[source]#

Bases: _NumpyWrapper, MatchingBackend

A numpy and pyfftw-based matching backend.

Methods

NumpyFFTWBackend.abs(*args, **kwargs)

Compute the absolute of array elements.

NumpyFFTWBackend.add(*args, **kwargs)

Element-wise addition of arrays.

NumpyFFTWBackend.arange(*args, **kwargs)

Arange values in evenly spaced interval.

NumpyFFTWBackend.argsort(*args, **kwargs)

Compute the indices to sort a given input array.

NumpyFFTWBackend.astype(arr, dtype)

Change the datatype of arr.

NumpyFFTWBackend.build_fft(fast_shape, ...)

Build forward and inverse real fourier transform functions.

NumpyFFTWBackend.center_of_mass(arr[, cutoff])

Computes the center of mass of a numpy ndarray instance using all available elements.

NumpyFFTWBackend.clip(*args, **kwargs)

Clip elements of arr.

NumpyFFTWBackend.compute_convolution_shapes(...)

Computes regular, optimized and fourier convolution shape.

NumpyFFTWBackend.concatenate(*args, **kwargs)

Join a sequence of objects along an existing axis.

NumpyFFTWBackend.datatype_bytes(dtype)

Return the number of bytes occupied by a given datatype.

NumpyFFTWBackend.device_count()

Returns the number of available GPU devices.

NumpyFFTWBackend.divide(*args, **kwargs)

Element-wise division of arrays.

NumpyFFTWBackend.dot(*args, **kwargs)

NumpyFFTWBackend.einsum(*args, **kwargs)

Compute the einstein notation based summation.

NumpyFFTWBackend.eps(dtype)

Returns the minimal difference representable by dtype.

NumpyFFTWBackend.extract_center(arr, newshape)

Extract the centered portion of an array based on a new shape.

NumpyFFTWBackend.fill(arr, value)

Fills arr in-place with a given value.

NumpyFFTWBackend.free_cache()

Free cached objects allocated by backend.

NumpyFFTWBackend.from_sharedarr(args)

Returns an array of given shape and dtype from shared memory location.

NumpyFFTWBackend.full(*args, **kwargs)

Returns an array filled with fill_value of specified shape and dtype.

NumpyFFTWBackend.get_available_memory()

Returns the available memory available for computations in bytes.

NumpyFFTWBackend.get_fundamental_dtype(arr)

Given an array instance, returns the corresponding fundamental python type, i.e., int, float or complex.

NumpyFFTWBackend.identity(*args, **kwargs)

NumpyFFTWBackend.indices(*args, **kwargs)

Creates an array representing the index grid of an input.

NumpyFFTWBackend.max(*args, **kwargs)

Compute the maximum of array elements.

NumpyFFTWBackend.max_filter_coordinates(...)

Identifies local maxima in score_space separated by min_distance.

NumpyFFTWBackend.max_score_over_rotations(...)

Update elements in max_scores and rotations where scores is larger than max_scores with score and rotation_index, respectivelty.

NumpyFFTWBackend.maximum(*args, **kwargs)

Compute the element wise maximum of arr1 and arr2.

NumpyFFTWBackend.mean(*args, **kwargs)

Compute the mean of array elements.

NumpyFFTWBackend.min(*args, **kwargs)

Compute the minimum of array elements.

NumpyFFTWBackend.minimum(*args, **kwargs)

Compute the element wise minimum of arr1 and arr2.

NumpyFFTWBackend.mod(*args, **kwargs)

Element-wise modulus of arrays.

NumpyFFTWBackend.multiply(*args, **kwargs)

Element-wise multiplication of arrays.

NumpyFFTWBackend.norm_scores(arr, exp_sq, ...)

Normalizes arr by the standard deviation ensuring numerical stability.

NumpyFFTWBackend.power(*args, **kwargs)

Compute the n-th power of an array.

NumpyFFTWBackend.repeat(*args, **kwargs)

Repeat each array element a specified number of times.

NumpyFFTWBackend.reshape(*args, **kwargs)

NumpyFFTWBackend.reverse(arr)

Reverse the order of elements in an array along all its axes.

NumpyFFTWBackend.rigid_transform(arr, ...[, ...])

Performs a rigid transformation.

NumpyFFTWBackend.roll(a, shift, axis, **kwargs)

Roll array elements along a specified axis.

NumpyFFTWBackend.set_device(device_index)

Context manager that sets active compute device device for operations.

NumpyFFTWBackend.size(arr)

Compute the number of elements of arr.

NumpyFFTWBackend.sqrt(*args, **kwargs)

Compute the square root of array elements.

NumpyFFTWBackend.square(*args, **kwargs)

Compute the square of array elements.

NumpyFFTWBackend.stack(*args, **kwargs)

Join a sequence of objects along a new axis.

NumpyFFTWBackend.std(*args, **kwargs)

Compute the standad deviation of array elements.

NumpyFFTWBackend.subtract(*args, **kwargs)

Element-wise subtraction of arrays.

NumpyFFTWBackend.sum(*args, **kwargs)

Compute the sum of array elements.

NumpyFFTWBackend.to_backend_array(arr)

Convert a numpy array instance to backend array type.

NumpyFFTWBackend.to_cpu_array(arr)

Convert an array of a given backend to a CPU array of that backend.

NumpyFFTWBackend.to_numpy_array(arr)

Convert an array of given backend to a numpy array.

NumpyFFTWBackend.to_sharedarr(arr[, ...])

Converts an array to an object shared in memory.

NumpyFFTWBackend.tobytes(arr)

Compute the bytestring representation of arr.

NumpyFFTWBackend.topk_indices(arr, k)

Determinces the indices of largest elements.

NumpyFFTWBackend.topleft_pad(arr, shape[, ...])

Returns an array that has been padded to a specified shape with a padding value at the top-left corner.

NumpyFFTWBackend.transpose(arr)

Compute the transpose of arr.

NumpyFFTWBackend.tril_indices(*args, **kwargs)

Compute indices of upper triangular matrix

NumpyFFTWBackend.unique(*args, **kwargs)

Find the unique elements of an array.

NumpyFFTWBackend.unravel_index(indices, shape)

Convert flat index to array indices.

NumpyFFTWBackend.where(*args, **kwargs)

Return elements from input depending on condition.

NumpyFFTWBackend.zeros(shape[, dtype])

Returns an aligned array of zeros with specified shape and dtype.