8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1fc42b3 + f6eac94 commit 0e25859Copy full SHA for 0e25859
lib/matplotlib/image.py
@@ -635,15 +635,7 @@ def set_data(self, A):
635
636
Note that this function does *not* update the normalization used.
637
"""
638
- # check if data is PIL Image without importing Image
639
- if hasattr(A, 'getpixel'):
640
- if A.mode == 'L':
641
- # greyscale image, but our logic assumes rgba:
642
- self._A = pil_to_array(A.convert('RGBA'))
643
- else:
644
- self._A = pil_to_array(A)
645
646
- self._A = cbook.safe_masked_invalid(A, copy=True)
+ self._A = cbook.safe_masked_invalid(A, copy=True)
647
648
if (self._A.dtype != np.uint8 and
649
not np.can_cast(self._A.dtype, float, "same_kind")):
0 commit comments