Closed
Description
mpl2.0b3
In [4]: plt.imshow(np.random.randint(-128, 128, dtype=np.int8, size=(3, 3)))
Out[4]: <matplotlib.image.AxesImage at 0x7fe00ba2f0f0>
In [5]: /usr/lib/python3.5/site-packages/matplotlib/colors.py:848: RuntimeWarning: overflow encos
resdat /= (vmax - vmin)
and a fully black image appears.
Pretty sure this is due to #6700 and can be fixed by restoring the casts of vmin and vmax to a floating type. However that type should be determined as in process_value
(i.e., np.float32 if dtype.itemsize <= 2 else np.promote_types(dtype, float)
-- see the issue for the discussion).
Not making a PR yet because this (as well as the original #6700) may or may not affect the other Normalize classes too? Perhaps that's something that should be factored out.
Metadata
Metadata
Assignees
Labels
No labels