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

Skip to content

Commit 58ac6a8

Browse files
committed
Suppress warning when handling NaNs in streamplot
1 parent 1b7856e commit 58ac6a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/tests/test_streamplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def test_masks_and_nans():
4242
mask[40:60, 40:60] = 1
4343
U = np.ma.array(U, mask=mask)
4444
U[:20, :20] = np.nan
45-
plt.streamplot(X, Y, U, V, color=U, cmap=plt.cm.Blues)
45+
with np.errstate(invalid='ignore'):
46+
plt.streamplot(X, Y, U, V, color=U, cmap=plt.cm.Blues)
4647

4748

4849
@cleanup

0 commit comments

Comments
 (0)