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 b1d657c

Browse filesBrowse files
author
Yi Wei
committed
add test_pcolorargs_with_read_only
1 parent 68dad00 commit b1d657c
Copy full SHA for b1d657c

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,17 +1478,18 @@ def test_pcolorargs():
14781478
match='are not monotonically increasing or decreasing'):
14791479
ax.pcolormesh(X, Y, Z, shading='auto')
14801480

1481-
# GH 26093
1481+
1482+
def test_pcolorargs_with_read_only():
14821483
x = np.arange(6).reshape(2, 3)
1483-
mask = np.broadcast_to([False, True, False], x.shape) # read-only array
1484-
masked_x = np.ma.array(x, mask=mask)
1484+
xmask = np.broadcast_to([False, True, False], x.shape) # read-only array
1485+
masked_x = np.ma.array(x, mask=xmask)
14851486
plt.pcolormesh(masked_x)
14861487

14871488
x = np.linspace(0, 1, 10)
14881489
y = np.linspace(0, 1, 10)
14891490
X, Y = np.meshgrid(x, y)
14901491
Z = np.sin(2 * np.pi * X) * np.cos(2 * np.pi * Y)
1491-
Zmask = np.broadcast_to([True, False]*5, Z.shape)
1492+
Zmask = np.broadcast_to([True, False] * 5, Z.shape)
14921493
masked_Z = np.ma.array(Z, mask=Zmask)
14931494
plt.pcolormesh(X, Y, masked_Z)
14941495

0 commit comments

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