Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 157030

Summary: bug in dev-python/matplotlib-0.87.7
Product: Gentoo Linux Reporter: Lukasz Ligowski <orangewarrior>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Lukasz Ligowski 2006-12-03 16:06:54 UTC
I've encountered today in my matplotlib this bug: 
http://article.gmane.org/gmane.comp.python.matplotlib.general/7308

and solution there helps.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-03 16:11:11 UTC
Please, post the description of the problem on the bug, rather then referring to third-party links.
Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2006-12-03 16:14:22 UTC
That's what the link says:

From: Eric Firing <efiring@...>
Subject: Re: Type Error
Newsgroups: gmane.comp.python.matplotlib.general
Date: 2006-11-13 17:48:07 GMT (2 weeks, 6 days, 6 hours and 23 minutes ago)
Luca,

It is a bug that appears when recent mpl is used with Numeric as opposed 
to numpy or numarray.  It is fixed in svn.  Your possible solutions are:

1) Use numpy or numarray instead of Numeric
2) Build mpl from svn
3) Edit axes.py as indicated in this diff chunk:

 <at>  <at>  -1217,7 +1217,7  <at>  <at> 
          ACCEPTS: len(2) sequence of floats
          """

-        if xmax is None and hasattr(xmin,'__len__'):
+        if xmax is None and iterable(xmin):
              xmin,xmax = xmin

          old_xmin,old_xmax = self.get_xlim()
 <at>  <at>  -1330,7 +1330,7  <at>  <at> 
          ACCEPTS: len(2) sequence of floats
          """

-        if ymax is None and hasattr(ymin,'__len__'):
+        if ymax is None and iterable(ymin):
              ymin,ymax = ymin

          old_ymin,old_ymax = self.get_ylim()

Eric

lucaberto@... wrote:
> Hello I have installed matplotlib on su 10.0 
> 
> when i do only this example 
> 
> from pylab import *
> plot([1,2,3])
> 
> i get this error:
> only length-1 attays can be converted to Python scalars.
> 
> How i have made wrong?
> 
> Regards
> 
> Luca
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2007-02-08 22:42:26 UTC
fixed in matplotlib-0.90.0, now in cvs.