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

Warning about using JpegImageFile under Python 3.11 #55

Open
poke1024 opened this issue May 25, 2023 · 1 comment
Open

Warning about using JpegImageFile under Python 3.11 #55

poke1024 opened this issue May 25, 2023 · 1 comment

Comments

@poke1024
Copy link

When running this under Python 3.11.3 as ipyplot.plot_images(images) where images is an array of PIL.Image (actually JpegImageFile), I get the following warning:

.../lib/python3.11/site-packages/ipyplot/_utils.py:95: FutureWarning: The input object of type 'JpegImageFile' is an array-like implementing one of the corresponding protocols (`__array__`, `__array_interface__` or `__array_struct__`); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted using `np.array(obj)`. To retain the old behaviour, you have to either modify the type 'JpegImageFile', or assign to an empty array created with `np.empty(correct_shape, dtype=object)`.
  return np.asarray(seq, dtype=type(seq[0]))

Is this already known?

@karolzak
Copy link
Owner

Hi @poke1024
No, it's not a known issue - thanks for raising this concern.
I'll try to follow up on this and consider a potential fix in the future

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

No branches or pull requests

2 participants