Make Image.__array__ take optional dtype argument#5572
Make Image.__array__ take optional dtype argument#5572radarhere merged 3 commits intopython-pillow:masterfrom
Conversation
This is required by the numpy protocol.
|
To demystify what is needed by This has been very stable and the reason the bug shows up in Pillow 8.3 is that it implemented only the version without the dtype passed in when switching to providing I looked at numpy's ndarray |
Thank you @radarhere. Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
|
I'm not entirely sure what to do with the codecov. It seems implausible to me that the line it points out in the |
|
I expect that was just because some CI jobs had an intermittent failure and were not returning their coverage results - everything looks fine with your latest commit. |
|
OK, I leave the it to you to take this forward, then. Thank you for your suggestions. |
There's currently a bug that interferes with the .to_tensor() function in torch. see: pytorch/pytorch#61125 (comment) and: python-pillow/Pillow#5572
This is required by the numpy protocol.
Fixes #5571