CupyBackend#

class CupyBackend(float_dtype=None, complex_dtype=None, int_dtype=None, overflow_safe_dtype=None, **kwargs)[source]#

Bases: NumpyFFTWBackend

A cupy-based matching backend.

Methods

CupyBackend.abs(*args, **kwargs)

Compute the absolute of array elements.

CupyBackend.add(*args, **kwargs)

Element-wise addition of arrays.

CupyBackend.arange(*args, **kwargs)

Arange values in evenly spaced interval.

CupyBackend.argsort(*args, **kwargs)

Compute the indices to sort a given input array.

CupyBackend.astype(arr, dtype)

Change the datatype of arr.

CupyBackend.build_fft(fast_shape, ...[, ...])

Build forward and inverse real fourier transform functions.

CupyBackend.center_of_mass(arr[, cutoff])

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

CupyBackend.clip(*args, **kwargs)

Clip elements of arr.

CupyBackend.compute_convolution_shapes(...)

Computes regular, optimized and fourier convolution shape.

CupyBackend.concatenate(*args, **kwargs)

Join a sequence of objects along an existing axis.

CupyBackend.datatype_bytes(dtype)

Return the number of bytes occupied by a given datatype.

CupyBackend.device_count()

Returns the number of available GPU devices.

CupyBackend.divide(*args, **kwargs)

Element-wise division of arrays.

CupyBackend.dot(*args, **kwargs)

CupyBackend.einsum(*args, **kwargs)

Compute the einstein notation based summation.

CupyBackend.eps(dtype)

Returns the minimal difference representable by dtype.

CupyBackend.extract_center(arr, newshape)

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

CupyBackend.fill(arr, value)

Fills arr in-place with a given value.

CupyBackend.free_cache()

Free cached objects allocated by backend.

CupyBackend.from_sharedarr(arr)

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

CupyBackend.full(*args, **kwargs)

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

CupyBackend.get_available_memory()

Returns the available memory available for computations in bytes.

CupyBackend.get_fundamental_dtype(arr)

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

CupyBackend.identity(*args, **kwargs)

CupyBackend.indices(*args, **kwargs)

Creates an array representing the index grid of an input.

CupyBackend.max(*args, **kwargs)

Compute the maximum of array elements.

CupyBackend.max_filter_coordinates(...)

Identifies local maxima in score_space separated by min_distance.

CupyBackend.max_score_over_rotations(scores, ...)

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

CupyBackend.maximum(*args, **kwargs)

Compute the element wise maximum of arr1 and arr2.

CupyBackend.mean(*args, **kwargs)

Compute the mean of array elements.

CupyBackend.min(*args, **kwargs)

Compute the minimum of array elements.

CupyBackend.minimum(*args, **kwargs)

Compute the element wise minimum of arr1 and arr2.

CupyBackend.mod(*args, **kwargs)

Element-wise modulus of arrays.

CupyBackend.multiply(*args, **kwargs)

Element-wise multiplication of arrays.

CupyBackend.norm_scores(arr, exp_sq, sq_exp, ...)

Normalizes arr by the standard deviation ensuring numerical stability.

CupyBackend.power(*args, **kwargs)

Compute the n-th power of an array.

CupyBackend.repeat(*args, **kwargs)

Repeat each array element a specified number of times.

CupyBackend.reshape(*args, **kwargs)

CupyBackend.reverse(arr)

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

CupyBackend.rigid_transform(arr, rotation_matrix)

Performs a rigid transformation.

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

Roll array elements along a specified axis.

CupyBackend.set_device(device_index)

Context manager that sets active compute device device for operations.

CupyBackend.size(arr)

Compute the number of elements of arr.

CupyBackend.sqrt(*args, **kwargs)

Compute the square root of array elements.

CupyBackend.square(*args, **kwargs)

Compute the square of array elements.

CupyBackend.stack(*args, **kwargs)

Join a sequence of objects along a new axis.

CupyBackend.std(a, *args, **kwargs)

Compute the standad deviation of array elements.

CupyBackend.subtract(*args, **kwargs)

Element-wise subtraction of arrays.

CupyBackend.sum(*args, **kwargs)

Compute the sum of array elements.

CupyBackend.to_backend_array(arr)

Convert a numpy array instance to backend array type.

CupyBackend.to_cpu_array(arr)

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

CupyBackend.to_numpy_array(arr)

Convert an array of given backend to a numpy array.

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

Converts an array to an object shared in memory.

CupyBackend.tobytes(arr)

Compute the bytestring representation of arr.

CupyBackend.topk_indices(arr, k)

Determinces the indices of largest elements.

CupyBackend.topleft_pad(arr, shape[, padval])

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

CupyBackend.transpose(arr)

Compute the transpose of arr.

CupyBackend.tril_indices(*args, **kwargs)

Compute indices of upper triangular matrix

CupyBackend.unique(ar[, axis])

Find the unique elements of an array.

CupyBackend.unravel_index(indices, shape)

Convert flat index to array indices.

CupyBackend.var(a, *args, **kwargs)

CupyBackend.where(*args, **kwargs)

Return elements from input depending on condition.

CupyBackend.zeros(*args, **kwargs)

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