Skip to content

Commit

Permalink
Mention available pixel types when converting from NumPy
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Mar 31, 2023
1 parent e95b55a commit 485532c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3041,6 +3041,10 @@ def fromarray(obj, mode=None):
If ``obj`` is not contiguous, then the ``tobytes`` method is called
and :py:func:`~PIL.Image.frombuffer` is used.
In the case of NumPy, be aware that Pillow modes do not always correspond
to NumPy dtypes. Pillow modes only offer 1-bit pixels, 8-bit pixels,
32-signed integer pixels and 32-bit floating point pixels.
Pillow images can also be converted to arrays::
from PIL import Image
Expand Down

0 comments on commit 485532c

Please sign in to comment.