Skip to content

Conversation

@jrmcornish
Copy link

In the (rare) event that there are no points inside the spline interval,
computing a spline crashes because it assumes implicitly that the
interval contains points (e.g. via use of min()). This patch fixes
this behaviour.

In the (rare) event that there are no points inside the spline interval,
computing a spline crashes because it assumes implicitly that the
interval contains points (e.g. via use of `min()`). This patch fixes
this behaviour.
@arturbekasov
Copy link
Collaborator

Nice and simple, thank you!

For this to be complete, any chance simple test cases could be added for affected functions? Should be as simple passing in inputs that are all outside of the spline interval, and making sure the outputs make sense (see https://github.com/bayesiains/nsf/blob/master/nde/transforms/splines/linear_test.py and other *_test.py files in the same folder).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants