Skip to content

Commit 2da9d8f

Browse files
committed
Merge pull request matplotlib#627 from efiring/quiver_angle
Quiver: copy input angles array to avoid side effects; fixes issue matplotlib#625
2 parents 3c3c466 + 585606f commit 2da9d8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/quiver.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,8 @@ def _make_verts(self, U, V):
575575
elif self.angles == 'uv':
576576
theta = np.angle(uv)
577577
else:
578-
theta = ma.masked_invalid(self.angles, copy=False).filled(0)
578+
# Make a copy to avoid changing the input array.
579+
theta = ma.masked_invalid(self.angles, copy=True).filled(0)
579580
theta = theta.ravel()
580581
theta *= (np.pi/180.0)
581582
theta.shape = (theta.shape[0], 1) # for broadcasting

0 commit comments

Comments
 (0)