SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Edin S. <edi...@gm...> - 2006年10月22日 10:59:26
Hi,
I built and installed the latest matplotlib from SVN.
When I type:
>>> from pylab import *
>>> plot([1,2,3])
I get:
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
2027, in plot
 ret = gca().plot(*args, **kwargs)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
985, in autoscale_view
 self.set_xlim(XL)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
1227, in set_xlim
 self.viewLim.intervalx().set_bounds(xmin, xmax)
TypeError: only length-1 arrays can be converted to Python scalars.
I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
From: Darren D. <dd...@co...> - 2006年10月22日 12:45:51
Did you try deleting your old mpl directory from site-packages, remove the 
build directory from you mpl sources, and rebuild from scratch?
On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
> Hi,
>
> I built and installed the latest matplotlib from SVN.
>
> When I type:
> >>> from pylab import *
> >>> plot([1,2,3])
>
> I get:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
> 2027, in plot
> ret = gca().plot(*args, **kwargs)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> 2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> 985, in autoscale_view
> self.set_xlim(XL)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> 1227, in set_xlim
> self.viewLim.intervalx().set_bounds(xmin, xmax)
> TypeError: only length-1 arrays can be converted to Python scalars.
>
> I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-- 
Darren S. Dale, Ph.D.
dd...@co...
From: Edin S. <edi...@gm...> - 2006年10月22日 14:42:22
Unfortunately, I forgot to do it :(
Then, just after sending the message to the list, it sprang to my
mind. To make it worse, I then mistakenly entered:
rm -Rf /path/to/site-packages
no matplotlib at the end, and hit enter.
There goes my beautiful Python install. :'(
Is there some switch to setup.py to make it remove the mpl dir or does
one allways have to do it by hand?
Cheers,
Edin
On 10/22/06, Darren Dale <dd...@co...> wrote:
> Did you try deleting your old mpl directory from site-packages, remove the
> build directory from you mpl sources, and rebuild from scratch?
>
>
>
> On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
> > Hi,
> >
> > I built and installed the latest matplotlib from SVN.
> >
> > When I type:
> > >>> from pylab import *
> > >>> plot([1,2,3])
> >
> > I get:
> >
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
> > 2027, in plot
> > ret = gca().plot(*args, **kwargs)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > 2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > 985, in autoscale_view
> > self.set_xlim(XL)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > 1227, in set_xlim
> > self.viewLim.intervalx().set_bounds(xmin, xmax)
> > TypeError: only length-1 arrays can be converted to Python scalars.
> >
> > I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Matplotlib-devel mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
> --
> Darren S. Dale, Ph.D.
> dd...@co...
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
From: Edin S. <edi...@gm...> - 2006年11月10日 23:21:50
I'm posting this because of the other thread Darren started.
I managed to reinstall python (and the modules I use) several days ago
and tried again to run matplotlib with Numeric as the default backend,
but got the same error (the same error Darren is getting). Then I
installed numpy, and everything was fixed :)
Best,
Edin
On 10/22/06, Edin Salkovic <edi...@gm...> wrote:
> Unfortunately, I forgot to do it :(
>
> Then, just after sending the message to the list, it sprang to my
> mind. To make it worse, I then mistakenly entered:
> rm -Rf /path/to/site-packages
>
> no matplotlib at the end, and hit enter.
>
> There goes my beautiful Python install. :'(
>
> Is there some switch to setup.py to make it remove the mpl dir or does
> one allways have to do it by hand?
>
> Cheers,
> Edin
>
> On 10/22/06, Darren Dale <dd...@co...> wrote:
> > Did you try deleting your old mpl directory from site-packages, remove the
> > build directory from you mpl sources, and rebuild from scratch?
> >
> >
> >
> > On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
> > > Hi,
> > >
> > > I built and installed the latest matplotlib from SVN.
> > >
> > > When I type:
> > > >>> from pylab import *
> > > >>> plot([1,2,3])
> > >
> > > I get:
> > >
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in ?
> > > File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
> > > 2027, in plot
> > > ret = gca().plot(*args, **kwargs)
> > > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
> > > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 985, in autoscale_view
> > > self.set_xlim(XL)
> > > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 1227, in set_xlim
> > > self.viewLim.intervalx().set_bounds(xmin, xmax)
> > > TypeError: only length-1 arrays can be converted to Python scalars.
> > >
> > > I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
> > >
> > > -------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services, security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> > > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > > Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Matplotlib-devel mailing list
> > > Mat...@li...
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> >
> > --
> > Darren S. Dale, Ph.D.
> > dd...@co...
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Matplotlib-devel mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> >
>
From: Eric F. <ef...@ha...> - 2006年11月11日 23:11:30
This is fixed now in SVN. The problem was that Numeric arrays lack a 
"len" attribute, and "hasattr(xmin, 'len')" was being used to find out 
whether xmin is a scalar or a length-2 array (xmin, xmax). The solution 
is to do the test with "iterable(xmin)" instead. The bug was introduced 
in 2782.
Eric
Edin Salkovic wrote:
> I'm posting this because of the other thread Darren started.
> 
> I managed to reinstall python (and the modules I use) several days ago
> and tried again to run matplotlib with Numeric as the default backend,
> but got the same error (the same error Darren is getting). Then I
> installed numpy, and everything was fixed :)
> 
> Best,
> Edin
> 
> On 10/22/06, Edin Salkovic <edi...@gm...> wrote:
>> Unfortunately, I forgot to do it :(
>>
>> Then, just after sending the message to the list, it sprang to my
>> mind. To make it worse, I then mistakenly entered:
>> rm -Rf /path/to/site-packages
>>
>> no matplotlib at the end, and hit enter.
>>
>> There goes my beautiful Python install. :'(
>>
>> Is there some switch to setup.py to make it remove the mpl dir or does
>> one allways have to do it by hand?
>>
>> Cheers,
>> Edin
>>
>> On 10/22/06, Darren Dale <dd...@co...> wrote:
>>> Did you try deleting your old mpl directory from site-packages, remove the
>>> build directory from you mpl sources, and rebuild from scratch?
>>>
>>>
>>>
>>> On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
>>>> Hi,
>>>>
>>>> I built and installed the latest matplotlib from SVN.
>>>>
>>>> When I type:
>>>>>>> from pylab import *
>>>>>>> plot([1,2,3])
>>>> I get:
>>>>
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in ?
>>>> File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
>>>> 2027, in plot
>>>> ret = gca().plot(*args, **kwargs)
>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>> 2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>> 985, in autoscale_view
>>>> self.set_xlim(XL)
>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>> 1227, in set_xlim
>>>> self.viewLim.intervalx().set_bounds(xmin, xmax)
>>>> TypeError: only length-1 arrays can be converted to Python scalars.
>>>>
>>>> I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
>>>>
>>>> -------------------------------------------------------------------------
>>>> Using Tomcat but need to do more? Need to support web services, security?
>>>> Get stuff done quickly with pre-integrated technology to make your job
>>>> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>>> Geronimo
>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>> _______________________________________________
>>>> Matplotlib-devel mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>> --
>>> Darren S. Dale, Ph.D.
>>> dd...@co...
>>>
>>> -------------------------------------------------------------------------
>>> Using Tomcat but need to do more? Need to support web services, security?
>>> Get stuff done quickly with pre-integrated technology to make your job easier
>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>> _______________________________________________
>>> Matplotlib-devel mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: Norbert N. <Nor...@gm...> - 2006年11月14日 11:26:50
Thanks for clearing this up. Coding with three different numeric
libraries in mind certainly is tricky... :-(
Eric Firing wrote:
> This is fixed now in SVN. The problem was that Numeric arrays lack a
> "len" attribute, and "hasattr(xmin, 'len')" was being used to find out
> whether xmin is a scalar or a length-2 array (xmin, xmax). The
> solution is to do the test with "iterable(xmin)" instead. The bug was
> introduced in 2782.
>
> Eric
>
> Edin Salkovic wrote:
>> I'm posting this because of the other thread Darren started.
>>
>> I managed to reinstall python (and the modules I use) several days ago
>> and tried again to run matplotlib with Numeric as the default backend,
>> but got the same error (the same error Darren is getting). Then I
>> installed numpy, and everything was fixed :)
>>
>> Best,
>> Edin
>>
>> On 10/22/06, Edin Salkovic <edi...@gm...> wrote:
>>> Unfortunately, I forgot to do it :(
>>>
>>> Then, just after sending the message to the list, it sprang to my
>>> mind. To make it worse, I then mistakenly entered:
>>> rm -Rf /path/to/site-packages
>>>
>>> no matplotlib at the end, and hit enter.
>>>
>>> There goes my beautiful Python install. :'(
>>>
>>> Is there some switch to setup.py to make it remove the mpl dir or does
>>> one allways have to do it by hand?
>>>
>>> Cheers,
>>> Edin
>>>
>>> On 10/22/06, Darren Dale <dd...@co...> wrote:
>>>> Did you try deleting your old mpl directory from site-packages,
>>>> remove the
>>>> build directory from you mpl sources, and rebuild from scratch?
>>>>
>>>>
>>>>
>>>> On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
>>>>> Hi,
>>>>>
>>>>> I built and installed the latest matplotlib from SVN.
>>>>>
>>>>> When I type:
>>>>>>>> from pylab import *
>>>>>>>> plot([1,2,3])
>>>>> I get:
>>>>>
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in ?
>>>>> File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
>>>>> 2027, in plot
>>>>> ret = gca().plot(*args, **kwargs)
>>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>>> 2131, in plot self.autoscale_view(scalex=scalex, scaley=scaley)
>>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>>> 985, in autoscale_view
>>>>> self.set_xlim(XL)
>>>>> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
>>>>> 1227, in set_xlim
>>>>> self.viewLim.intervalx().set_bounds(xmin, xmax)
>>>>> TypeError: only length-1 arrays can be converted to Python scalars.
>>>>>
>>>>> I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>>
>>>>> Using Tomcat but need to do more? Need to support web services,
>>>>> security?
>>>>> Get stuff done quickly with pre-integrated technology to make your
>>>>> job
>>>>> easier Download IBM WebSphere Application Server v.1.0.1 based on
>>>>> Apache
>>>>> Geronimo
>>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>>>
>>>>> _______________________________________________
>>>>> Matplotlib-devel mailing list
>>>>> Mat...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>> -- 
>>>> Darren S. Dale, Ph.D.
>>>> dd...@co...
>>>>
>>>> -------------------------------------------------------------------------
>>>>
>>>> Using Tomcat but need to do more? Need to support web services,
>>>> security?
>>>> Get stuff done quickly with pre-integrated technology to make your
>>>> job easier
>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>>> Geronimo
>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>>
>>>> _______________________________________________
>>>> Matplotlib-devel mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>>>
>>
>> -------------------------------------------------------------------------
>>
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your
>> job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
From: John H. <jdh...@ac...> - 2006年11月14日 14:30:59
>>>>> "Norbert" == Norbert Nemec <Nor...@gm...> writes:
 Norbert> Thanks for clearing this up. Coding with three different
 Norbert> numeric libraries in mind certainly is tricky... :-(
This is another good example of the benefits of duck typing -- using
"iterable" rather than "hasattar" checks for the interface rather than
the implementation.
JDH
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /