mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Better error messaging in PIL.image.fromarray
This commit is contained in:
parent
bb1fc75e55
commit
47691906df
|
@ -2633,7 +2633,7 @@ def fromarray(obj, mode=None):
|
|||
typekey = (1, 1) + shape[2:], arr["typestr"]
|
||||
mode, rawmode = _fromarray_typemap[typekey]
|
||||
except KeyError:
|
||||
raise TypeError("Cannot handle this data type")
|
||||
raise TypeError("Cannot handle this data type: %s, %s" % typekey)
|
||||
else:
|
||||
rawmode = mode
|
||||
if mode in ["1", "L", "I", "P", "F"]:
|
||||
|
|
Loading…
Reference in New Issue
Block a user