Skip to content

Conversation

@scottstanie
Copy link
Member

  • Checks for out of bounds elements over input sequence before running
  • Adds test for OOB calls to .eval

Closes #187

Calling `LUT2d.eval()` on out‐of‐bounds coordinates behaves inconsistently depending on whether you pass Python floats or NumPy arrays:
- With two floats, the call prints a journal warning and raises a catchable `RuntimeError`.
- With a float + NumPy array (or two arrays), you see the journal warning, but Python aborts with an uncaught `pyre::journal::application_error`.
Copy link
Contributor

@Tyler-g-hudson Tyler-g-hudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears useful, and the logic makes sense. LGTM
@hfattahi We've got a handful of orphan PR's like this, when we've got time it'd be good to formulate a plan for reviewing them.

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.

Python crashes on out of bounds array call to LUT2d.eval()

2 participants