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

2D: do not return points outside the bounds, closes #181 #182

Merged
merged 2 commits into from Apr 15, 2019

Conversation

basnijholt
Copy link
Member

@andrenmelo, this is the (a) solution.

@python-adaptive/core what do you think?

@basnijholt basnijholt added the bug label Apr 10, 2019
@basnijholt basnijholt changed the base branch from master to stable-0.7 April 10, 2019 09:46
@akhmerov
Copy link
Contributor

Here the numerical errors don't accumulate over time, and therefore we may simply choose a relative tolerance that is merely much higher than the double precision (e.g. 1e-13), and not go over the complete interpolation each time.

Also as implemented, there is no guarantee that all the points that are selected are within the triangulation if e.g. the midpoint on the edge of the rectangle is outermost and the top or bottom are ε away from it.

@basnijholt
Copy link
Member Author

Also as implemented, there is no guarantee that all the points that are selected are within the triangulation if e.g. the midpoint on the edge of the rectangle is outermost and the top or bottom are ε away from it.

I think that the rounding of the same number should always happen the same, so I don't think this could occur.

Here the numerical errors don't accumulate over time, and therefore we may simply choose a relative tolerance that is merely much higher than the double precision (e.g. 1e-13), and not go over the complete interpolation each time.

So you just mean doing?

eps = 1e-13
x = y = np.linspace(-0.5 + eps, 0.5 - eps, n)

@akhmerov
Copy link
Contributor

LGTM

@basnijholt basnijholt merged commit 98607da into stable-0.7 Apr 15, 2019
@basnijholt basnijholt mentioned this pull request May 6, 2019
@basnijholt basnijholt deleted the fix_nan_2d branch May 8, 2019 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants