Revision: 7827
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7827&view=rev
Author:   efiring
Date:     2009-09-25 23:56:14 +0000 (Fri, 25 Sep 2009)

Log Message:
-----------
Fix bug in quiver handling of masked U, V

Modified Paths:
--------------
    branches/v0_99_maint/lib/matplotlib/quiver.py

Modified: branches/v0_99_maint/lib/matplotlib/quiver.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/quiver.py       2009-09-25 18:54:43 UTC 
(rev 7826)
+++ branches/v0_99_maint/lib/matplotlib/quiver.py       2009-09-25 23:56:14 UTC 
(rev 7827)
@@ -516,6 +516,11 @@
         xy = (X+Y*1j) * np.exp(1j*theta)*self.width
         xy = xy[:,:,np.newaxis]
         XY = np.concatenate((xy.real, xy.imag), axis=2)
+        if self.Umask is not ma.nomask:
+            XY = ma.array(XY)
+            XY[self.Umask] = ma.masked
+            # This might be handled more efficiently with nans, given
+            # that nans will end up in the paths anyway.
 
         return XY
 
@@ -573,10 +578,7 @@
             tooshort = np.repeat(tooshort, 8, 1)
             np.putmask(X, tooshort, X1)
             np.putmask(Y, tooshort, Y1)
-        if self.Umask is not ma.nomask:
-            mask = np.repeat(self.Umask[:,np.newaxis], 8, 1)
-            X = ma.array(X, mask=mask, copy=False)
-            Y = ma.array(Y, mask=mask, copy=False)
+        # Mask handling is deferred to the caller, _make_verts.
         return X, Y
 
     quiver_doc = _quiver_doc


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to