Closed
Description
Problem
#22485 changed AxesImage.__str__
to AxesImage(size=(nrows, ncols))
. While this indeed corresponds to AxesImage.get_size
, this is not consistent with the numpy API, where array.shape = (nrows, ncols)
and array.size = nrows * ncols
.
Perhaps we can consider 1) tweaking __str__
to AxesImage(shape=(nrows, ncols))
instead, and add get_shape
as an alias for get_size
? Alternatively, get_shape
could return self._A.shape
(i.e., including whether the data is colormapped, RGB, or RGBA), and we could use that info in __str__
? (displaying whether the data is colormapped/RGB/RGBA seems reasonably useful)
Proposed solution
No response