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 e11f2b9 + 6c9f8a9 commit f8ea2c5Copy full SHA for f8ea2c5
lib/matplotlib/colors.py
@@ -925,7 +925,9 @@ def __call__(self, value, clip=None):
925
result = np.ma.array(np.clip(result.filled(vmax), vmin, vmax),
926
mask=mask)
927
# ma division is very slow; we can take a shortcut
928
- resdat = result.data
+ # use np.asarray so data passed in as an ndarray subclass are
929
+ # interpreted as an ndarray. See issue #6622.
930
+ resdat = np.asarray(result.data)
931
resdat -= vmin
932
resdat /= (vmax - vmin)
933
result = np.ma.array(resdat, mask=result.mask, copy=False)
0 commit comments