PyLops-GPU Utilities

Alongside with its Linear Operators and Solvers, PyLops-GPU contains also a number of auxiliary routines.

Shared

Backends

backend.device() Automatically identify device to be used with PyTorch

Dot-test

dottest(Op, nr, nc[, tol, dtype, …]) Dot test.

Torch2Numpy

torch2numpy.numpytype_from_torchtype(torchtype) Convert torch type into equivalent numpy type
torch2numpy.torchtype_from_numpytype(numpytype) Convert torch type into equivalent numpy type

Complex Tensors

complex.complextorch_fromnumpy(x) Convert complex numpy array into torch ComplexTensor
complex.complexnumpy_fromtorch(xt) Convert torch ComplexTensor into complex numpy array
complex.conj(x) Apply complex conjugation to torch ComplexTensor
complex.divide(x, y) Element-wise division of torch Tensor and torch ComplexTensor.
complex.reshape(x, shape) Reshape torch ComplexTensor
complex.flatten(x) Flatten torch ComplexTensor