pyoperators 0.11.dev11-g64ac6

The PyOperators package defines operators and solvers for high-performance computing. These operators are multi-dimensional functions with optimised and controlled memory management. If linear, they behave like matrices with a sparse storage footprint.

Getting started

To define an operator, one needs to define a direct function
which will replace the usual matrix-vector operation:

To output a corresponding dense matrix, one needs to specify the input shape:

>>> A.todense(shapein=2)
array([[2, 0],
[0, 2]])

Operators do not have to be linear, but if they are not, they cannot be seen
as matrices. Some operators are already predefined, such as the
IdentityOperator, the DiagonalOperator or the nonlinear
ClippingOperator.

The previous A matrix could be defined more easily like this :

>>> A = 2 * pyoperators.I

where I is the identity operator with no explicit shape.

Operators can be combined together by addition, element-wise multiplication or composition (note that the * sign stands for composition):