-
Notifications
You must be signed in to change notification settings - Fork 52
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
FDataGrid.restrict
option with_bounds
#561
Conversation
I now notice that this option potentially modifies the result of every One easy solution would be to set default value to In turn, it might be necessary to change some doc example, I'm not sure about it. In any case, I will wait for your feedback and insights regarding this, bcause you have a much deeper view of the whole package. |
The "proper" way to do it would be:
|
Hi, I will argue against keeping outside points for 2 reasons:
I agree that using Is there a way to know more about I think a good way to choose the defaul value will be to test the accuracy gains on plausible cases, as well as execution time lost. |
That is true, although it is more a semantic issue. By default, the extrapolation strategy of
Extrapolation would be applied for the points outside the domain, in spite of having values measured for them. The default extrapolation, of course, uses these values.
Yes, it is a class to represent functions measured at different points (not a fixed grid). It was first proposed in #498 and a tentative implementation is in #536.
I want to discuss also the issue with the other people involved in the project, as they may provide more insights. They are currently on vacation but we will meet again in September. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #561 +/- ##
===========================================
+ Coverage 86.02% 86.05% +0.02%
===========================================
Files 147 147
Lines 11660 11678 +18
===========================================
+ Hits 10031 10049 +18
Misses 1629 1629
☔ View full report in Codecov by Sentry. |
dim_points = grid_points[dim] | ||
left = [a] * (a < dim_points[0]) | ||
right = [b] * (b > dim_points[-1]) | ||
grid_points[dim] = np.concatenate((left, dim_points, right)) |
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.
The Mypy error in this line seems to be numpy/numpy#20901. It surprises me, as I think that it should be fixed in the most recent NumPy versions.
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.
Just one silly suggestion by the style checker. The rest LGTM.
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 now.
@all-contributors please add @ego-thales for his code contributions and ideas. |
I've put up a pull request to add @ego-thales! 🎉 |
Implemented proposed enhancement from #560.
A few notes to keep in mind when (or before) merging:
with_bounds
defaults toFalse
,dim_domain
,domain
's boundary potentially contains a lot of points, which might end up pretty slow. That said, I guess it has to happen when manipulating a functional object on a huge domain size,Waiting for your feedback!
Cheers :)
Élie