Revision: 6811
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6811&view=rev
Author: efiring
Date: 2009-01-20 02:03:42 +0000 (Tue, 20 Jan 2009)
Log Message:
-----------
Fix bug in quiver argument handling.
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/quiver.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-01-19 18:11:35 UTC (rev 6810)
+++ branches/v0_98_5_maint/CHANGELOG 2009-01-20 02:03:42 UTC (rev 6811)
@@ -1,3 +1,5 @@
+2009-01-19 Fix bug in quiver argument handling. - EF
+
2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
2009-01-16 Fix bug in is_string_like so it doesn't raise an
Modified: branches/v0_98_5_maint/lib/matplotlib/quiver.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/quiver.py 2009-01-19 18:11:35 UTC
(rev 6810)
+++ branches/v0_98_5_maint/lib/matplotlib/quiver.py 2009-01-20 02:03:42 UTC
(rev 6811)
@@ -386,14 +386,13 @@
X, Y, U, V, C = [None]*5
args = list(args)
if len(args) == 3 or len(args) == 5:
- C = ma.asarray(args.pop(-1)).ravel()
+ C = ma.asarray(args.pop(-1))
V = ma.asarray(args.pop(-1))
U = ma.asarray(args.pop(-1))
- nn = np.shape(U)
- nc = nn[0]
- nr = 1
- if len(nn) > 1:
- nr = nn[1]
+ if U.ndim == 1:
+ nr, nc = 1, U.shape[0]
+ else:
+ nr, nc = U.shape
if len(args) == 2: # remaining after removing U,V,C
X, Y = [np.array(a).ravel() for a in args]
if len(X) == nc and len(Y) == nr:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins