Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67b5f92

Browse files
committed
DOC: add line note
1 parent ba76f9c commit 67b5f92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/image.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
368368
# values to carry the over/under/bad information
369369
rgba = np.empty((A.shape[0], A.shape[1], 4), dtype=A.dtype)
370370
rgba[..., 0] = A # normalized data
371+
# this is to work around spurious warnings coming
372+
# out of masked arrays.
371373
with np.errstate(invalid='ignore'):
372374
rgba[..., 1] = A < 0 # under data
373375
rgba[..., 2] = A > 1 # over data

0 commit comments

Comments
 (0)