| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report❌ Patch coverage is 96.77419% with 9 lines in your changes missing coverage. Please review. @@ Coverage Diff @@
## main #2788 +/- ##
==========================================
+ Coverage 83.38% 83.44% +0.06%
==========================================
Files 248 249 +1
Lines 51960 52203 +243
Branches 4480 4496 +16
==========================================
+ Hits 43326 43560 +234
- Misses 7879 7883 +4
- Partials 755 760 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
|
|
||
| # Code generation options for derivatives | ||
| o['expand'] = oo.pop('expand', cls.EXPAND) | ||
| o['interp-mode'] = oo.pop('interp-mode', cls.INTERP_MODE) |
There was a problem hiding this comment.
nitpicking, this should stay in a separate section being something related to the numerics, rather than performance (which is the case of all other opt-options).
As in, later on, perhaps around line 103, with a suitable comment
I'm also not sure if we really want this to be an Operator opt-option, as opposed to a Function parameter for example or something else
Sorry, something went wrong.
There was a problem hiding this comment.
it also won't play well with the tuner this way, unless we specialise it somehow
Sorry, something went wrong.
| return not self or all(s == 0 for s in self) | ||
|
|
||
| def __eq__(self, other): | ||
| # Two empty-or-all-zero Staggerings are equivalent regardless of arity |
There was a problem hiding this comment.
imho this could/should rather be normalized at __new__
Sorry, something went wrong.
There was a problem hiding this comment.
Well not easily no, because you can't have a wide variety of things, like 2D functions in 3D and so on that you can't really normalize.
Sorry, something went wrong.
| evalf_table[Pow] = evalf_table[sympy.Pow] | ||
|
|
||
|
|
||
| def _interp_mapper(source, target, dims): |
There was a problem hiding this comment.
would it be worth moving all of the interpolation-related stuff into a separate module finite_differences/interpolations.py ?
Sorry, something went wrong.
There was a problem hiding this comment.
Seconded - it would make it easier to find things and limit the size of files
Sorry, something went wrong.
| Interpolation mode used by `Mul._eval_at` when projecting a multi-factor | ||
| expression onto a target staggered location: | ||
|
|
||
| * `'direct'` (default): each factor is shifted to `func`'s location |
There was a problem hiding this comment.
what's func here (and below) ?
Sorry, something went wrong.
| `func`'s, the symmetric form `I * (a * I^T * b)` is built -- all | ||
| factors are gathered at the highest-priority "block" location via | ||
| `I^T`, multiplied there, and the product is interpolated to `func` | ||
| via `I`. Use this for operators whose continuous form decomposes as |
There was a problem hiding this comment.
this sentence "Use this ..." doesn't seem to be the complement of the other sentence you used for the "direct" mode above i.e. "the mode to pick unless ..."
Sorry, something went wrong.
There was a problem hiding this comment.
Nitpick: might as well call it 08_staggered_interpolation for minimum ambiguity. Looks super good though. Is this a Claude job? Less typos than usual 😅
Sorry, something went wrong.
There was a problem hiding this comment.
This is a side-quest PR, so yeah definitely claude tutorial :D
Sorry, something went wrong.
| evalf_table[Pow] = evalf_table[sympy.Pow] | ||
|
|
||
|
|
||
| def _interp_mapper(source, target, dims): |
There was a problem hiding this comment.
Seconded - it would make it easier to find things and limit the size of files
Sorry, something went wrong.
| """ | ||
| ref = {} | ||
| for dim in deriv.dimensions: | ||
| if dim in deriv.dims and dim in func.indices_ref.getters: |
There was a problem hiding this comment.
func.indices_ref.getters isn't equivalent to func.dimensions right? could u remind me why?
Sorry, something went wrong.
There was a problem hiding this comment.
Actually no it should be the same, just an oversight
Sorry, something went wrong.
There was a problem hiding this comment.
ok maybe add a memo for either this or next PR
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.