Skip to content

Commit 1d4682c

Browse files
committed
Prevent warning with masked array inputs
1 parent 0d7a1d1 commit 1d4682c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/streamplot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def get_integrator(u, v, dmap, minlength):
325325
# speed (path length) will be in axes-coordinates
326326
u_ax = u / dmap.grid.nx
327327
v_ax = v / dmap.grid.ny
328-
speed = np.sqrt(u_ax**2 + v_ax**2)
328+
speed = np.ma.sqrt(u_ax**2 + v_ax**2)
329329

330330
def forward_time(xi, yi):
331331
ds_dt = interpgrid(speed, xi, yi)

0 commit comments

Comments
 (0)