lanl / scico

Scientific Computational Imaging COde
BSD 3-Clause "New" or "Revised" License
90 stars 17 forks source link

Revisit mechanism supporting math operations involving `LinearOperator` objects #502

Open bwohlberg opened 4 months ago

bwohlberg commented 4 months ago

The mechanism supporting math operations involving LinearOperator objects (specifically scalar multiplication and addition and subtraction of two LinearOperator objects) should be revisited to determine whether it can be simplified. Specific issues include:

  1. The _wrap_add_sub wrapper defined in _linop.py duplicates the __add__ and __sub__ definitions in class LinearOperator.
  2. It's not clear whether applying the wrapper to methods of classes derived from LinearOperator is really necessary.
Michael-T-McCann commented 4 months ago

For an example of a class that we hope could be simpler, see ScaledIdentity.