Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have more basic operator classes #113

Open
1 of 2 tasks
chaithyagr opened this issue Apr 14, 2021 · 1 comment
Open
1 of 2 tasks

Have more basic operator classes #113

chaithyagr opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels
Projects

Comments

@chaithyagr
Copy link
Contributor

Currently, we have GradParent and ProxParent base classes.

However, it would help to have a more generic Base Operator classes, particularly linear operator class like the OperatorBase in pysap-mri :

https://github.com/CEA-COSMIC/pysap-mri/blob/90c9d12687660a266f029680359a532efdb0db3f/mri/operators/base.py#L9

A similar base class with just op method could be used for Gradient and Proximity.

The reason why this will affect is cause I have some more generic proximities and gradients, which cant be inherited from GradParent and ProxParent, which misses the flow and also causes a lot of warnings.

Are you planning to submit a Pull Request?

  • Yes
  • No
@chaithyagr chaithyagr added the bug label Apr 14, 2021
@sfarrens sfarrens self-assigned this Apr 14, 2021
@sfarrens sfarrens added this to ToDo in ModOpt-dev via automation Apr 14, 2021
@paquiteau
Copy link
Contributor

Instead of checking the parents/ grand-parents and the whole family tree, why not check only if the child class has the correct methods availables ? Its easily doable using the built-ins hasattr and callable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
ModOpt-dev
  
ToDo
Development

No branches or pull requests

3 participants