Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 616be00

Browse filesBrowse files
author
Yi Wei
committed
FIX: pcolormesh writing to read-only input mask
1 parent 3405fa7 commit 616be00
Copy full SHA for 616be00

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5764,7 +5764,7 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
57645764
else:
57655765
X, Y = np.meshgrid(np.arange(ncols + 1), np.arange(nrows + 1))
57665766
shading = 'flat'
5767-
C = cbook.safe_masked_invalid(C)
5767+
C = cbook.safe_masked_invalid(C, copy=True)
57685768
return X, Y, C, shading
57695769

57705770
if len(args) == 3:
@@ -5853,7 +5853,7 @@ def _interp_grid(X):
58535853
Y = _interp_grid(Y.T).T
58545854
shading = 'flat'
58555855

5856-
C = cbook.safe_masked_invalid(C)
5856+
C = cbook.safe_masked_invalid(C, copy=True)
58575857
return X, Y, C, shading
58585858

58595859
@_preprocess_data()

‎lib/matplotlib/cbook.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cbook.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def remove(self, o):
668668
self.push(elem)
669669

670670

671-
def safe_masked_invalid(x, copy=True):
671+
def safe_masked_invalid(x, copy=False):
672672
x = np.array(x, subok=True, copy=copy)
673673
if not x.dtype.isnative:
674674
# If we have already made a copy, do the byteswap in place, else make a

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.