Skip to content

Commit ec80b01

Browse files
committed
Merge r6811 from v0_98_5_maint
svn path=/trunk/matplotlib/; revision=6812
1 parent 924045d commit ec80b01

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2009-01-19 Fix bug in quiver argument handling. - EF
2+
13
2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
24

35
2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is

lib/matplotlib/quiver.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,13 @@ def _parse_args(self, *args):
386386
X, Y, U, V, C = [None]*5
387387
args = list(args)
388388
if len(args) == 3 or len(args) == 5:
389-
C = ma.asarray(args.pop(-1)).ravel()
389+
C = ma.asarray(args.pop(-1))
390390
V = ma.asarray(args.pop(-1))
391391
U = ma.asarray(args.pop(-1))
392-
nn = np.shape(U)
393-
nc = nn[0]
394-
nr = 1
395-
if len(nn) > 1:
396-
nr = nn[1]
392+
if U.ndim == 1:
393+
nr, nc = 1, U.shape[0]
394+
else:
395+
nr, nc = U.shape
397396
if len(args) == 2: # remaining after removing U,V,C
398397
X, Y = [np.array(a).ravel() for a in args]
399398
if len(X) == nc and len(Y) == nr:

0 commit comments

Comments
 (0)