Alter LinearOperator so as to become independent of scipy
Motivation
When PyLops was idealized, it relied heavily on the widely available SciPy implementation of a LinearOperator. This was great in the beginning as it allowed for rapid development and integration into the NumPy/SciPy ecosystem. As PyLops grew, it has implemented a richer environment for LinearOperators. At the same time, we are now finding that, since LinearOperator's internals are subject to change from SciPy, it may be advantageous to offer an implementation fully independent from SciPy.
Definition of solved
- Implement all functionality that SciPy's LinearOperator already offers directly into PyLops' LinearOperator.
- Remove any unecessary usage of
scipy.sparse.linalg.LinearOperator - Ensure that all tests pass ideally without any modification
I think it's related, but import pylops gives me the error : ImportError: cannot import name '_ProductLinearOperator' from 'scipy.sparse.linalg.interface' (/home/nicolas/.local/lib/python3.8/site-packages/scipy/sparse/linalg/interface.py) with scipy 1.8.0
Downgrading to scipy1.7.3 solved it.
Hi @NicolasMICAUX thank you very much for reporting this. Indeed this issue was raised exactly because of this change in SciPy. @mrava87 has issued a fix, so we will be releasing a new version with the fix very soon. For now, the solution is to downgrade as you mentioned.
@mrava87: Branch v1.17.x has all commits since dev split from master (they are all non-breaking) so I think the best thing is to release v1.17.1 from the tip of v1.17.x whenever you have a chance.
One more option for now, if you really want to have all features beyond 1.17.0 is:
pip install git+https://[email protected]/PyLops/pylops.git@dev
and that would work with scipy 1.8.0. Or you can wait a couple of days, I am going to make the new release no later than next weekend :)
Closed by #482