Skip to content

Raise a warning if NumPy failed to raise an error during conversion#6594

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:numpy
Oct 12, 2022
Merged

Raise a warning if NumPy failed to raise an error during conversion#6594
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:numpy

Conversation

@radarhere
Copy link
Copy Markdown
Member

Resolves #6588

For NumPy < 1.23, if an error is raised when converting an image to a NumPy array, #6394 allowed NumPy to catch that, preventing the user from seeing it.

This PR will instead raise the error message as a warning.

@hugovk hugovk merged commit c2efd60 into python-pillow:main Oct 12, 2022
@radarhere radarhere deleted the numpy branch October 12, 2022 10:58
@radarhere radarhere changed the title Raise a warning if NumPy will not raise an error during conversion Raise a warning if NumPy failed to raise an error during conversion Oct 12, 2022
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.

Pillow should require NumPy >= 1.23

2 participants