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.
1 parent 1caf775 commit 8d9357eCopy full SHA for 8d9357e
lib/matplotlib/colors.py
@@ -947,7 +947,9 @@ def __call__(self, value, clip=None):
947
result = ma.array(np.clip(result.filled(vmax), vmin, vmax),
948
mask=mask)
949
# ma division is very slow; we can take a shortcut
950
- resdat = result.data
+ # use np.asarray so data passed in as an ndarray subclass are
951
+ # interpreted as an ndarray. See issue #6622.
952
+ resdat = np.asarray(result.data)
953
resdat -= vmin
954
resdat /= (vmax - vmin)
955
result = np.ma.array(resdat, mask=result.mask, copy=False)
0 commit comments