Set the image array. Note that this function does *not* update the normalization used. Parameters ---------- A : array-like or `PIL.Image.Image`
(self, A)
| 695 | return A |
| 696 | |
| 697 | def set_data(self, A): |
| 698 | """ |
| 699 | Set the image array. |
| 700 | |
| 701 | Note that this function does *not* update the normalization used. |
| 702 | |
| 703 | Parameters |
| 704 | ---------- |
| 705 | A : array-like or `PIL.Image.Image` |
| 706 | """ |
| 707 | if isinstance(A, PIL.Image.Image): |
| 708 | A = pil_to_array(A) # Needed e.g. to apply png palette. |
| 709 | self._A = self._normalize_image_array(A) |
| 710 | self._imcache = None |
| 711 | self.stale = True |
| 712 | |
| 713 | def set_array(self, A): |
| 714 | """ |
no test coverage detected