probabilistic-numerics / probnum

Probabilistic Numerics in Python.
http://probnum.org
MIT License
439 stars 57 forks source link

Override `linop` instead of `_evaluate_linop` #818

Closed timweiland closed 1 year ago

timweiland commented 1 year ago

In a Nutshell

Override linop instead of _evaluate_linop in arithmetic fallback covariance functions

Detailed 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.

codecov[bot] commented 1 year ago

Codecov Report

Merging #818 (18224cc) into main (e7f332e) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           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           
Impacted Files Coverage Δ
...robnum/randprocs/covfuncs/_arithmetic_fallbacks.py 82.05% <100.00%> (ø)