-
Notifications
You must be signed in to change notification settings - Fork 57
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
Override linop
instead of _evaluate_linop
#818
Override linop
instead of _evaluate_linop
#818
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but maybe @marvinpfoertner should take a quick look as well. I think he may have written this oroginally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🙏🏻
In arithmetic fallback covariance functions, override `linop` instead of `_evaluate_linop`, because the latter has the problem that the input preprocessing destroys attributes of np.array subclasses. Keeping the option of np.array subclassing can be very useful for certain linop implementations, e.g. tensor product covariance functions.
1a00636
to
ba3e3d1
Compare
Codecov Report
@@ Coverage Diff @@
## main #818 +/- ##
=======================================
Coverage 91.15% 91.15%
=======================================
Files 218 218
Lines 8216 8216
Branches 1061 1061
=======================================
Hits 7489 7489
Misses 499 499
Partials 228 228
|
In a Nutshell
Override
linop
instead of_evaluate_linop
in arithmetic fallback covariance functionsDetailed Description
In arithmetic fallback covariance functions, override
linop
instead of_evaluate_linop
, because the latter has the problem that the input preprocessing destroys attributes of np.array subclasses. Keeping the option of np.array subclassing can be very useful for certain linop implementations, e.g. tensor product covariance functions, where you might want to subclass np.array to represent grid structure in the inputs.