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

Validate image #136

Merged
merged 2 commits into from
Oct 15, 2018
Merged

Validate image #136

merged 2 commits into from
Oct 15, 2018

Conversation

jakirkham
Copy link
Member

Make sure that image is an ndarray before proceeding further in lineRankOrderFilter. Ensure that image is converted to an ndarray if possible and if not allow Cython or NumPy to raise as appropriate.

Add a check in `lineRankOrderFilter`'s signature to ensure `image` is
not `None`.
Use `numpy.asarray` to convert `image` to an `ndarray` if it is not one
already. Should also catch and raise for all situations where `image`
cannot be converted to an `ndarray`.
@jakirkham jakirkham merged commit fcf7f95 into nanshe-org:master Oct 15, 2018
@jakirkham jakirkham deleted the validate_image branch October 15, 2018 12:59
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.

1 participant