Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Numpy compatibility issue (python 2.6)

Reply
Thread Tools

Numpy compatibility issue (python 2.6)

 
 
bruno
Guest
Posts: n/a
 
      04-29-2009
It seems that some TypeError messages have changed between versions
2.5 and 2.6, e.g.:

from math import radians
radians ()

in 2.5, this leads to "radians () takes exactly 1 argument (0 given)"
whereas in 2.6, the message is now: "radians () takes exactly one
argument (0 given)"

I agree that the two messages do have quite similar meanings, but the
2.6 message can no longer be "interpreted" by the _get_nargs function
(in numpy/lib/function_base.py) As a result, you can no longer define
(same example):
v_radians = numpy.vectorize (radians)

Anyone already confronted to this problem?

Thanks in advance...
 
Reply With Quote
 
 
 
 
Carl Banks
Guest
Posts: n/a
 
      04-29-2009
On Apr 29, 5:18*am, bruno <(E-Mail Removed)> wrote:
> It seems that some TypeError messages have changed between versions
> 2.5 and 2.6, e.g.:
>
> from math import radians
> radians ()
>
> in 2.5, this leads to "radians () takes exactly 1 argument (0 given)"
> whereas in 2.6, the message is now: "radians () takes exactly one
> argument (0 given)"
>
> I agree that the two messages do have quite similar meanings, but the
> 2.6 message can no longer be "interpreted" by the _get_nargs function
> (in numpy/lib/function_base.py) As a result, you can no longer define
> (same example):
> v_radians = numpy.vectorize (radians)
>
> Anyone already confronted to this problem?


I would file a bug report on numpy issue tracker. The bug is on their
end for trying to parse error messages. However, given that there's
no other option in this case, and that the workaround should be pretty
easy (I doubt any numbers but one are typed out, and it should be no
problem to special-case that), it should be fixed there.


Carl Banks
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing numpy over an older numpy Tom Kacvinsky Python 1 06-15-2012 07:15 PM
A More Concise Description of Numpy than the Guide to Numpy? W. eWatson Python 2 11-23-2009 08:58 PM
NumPy Question - numpy.put in multi-dimensional array Bryan.Fodness@gmail.com Python 2 11-13-2007 10:36 PM
numpy migration (also posted to numpy-discussion) Duncan Smith Python 3 04-25-2007 01:36 AM
Trouble with numpy-0.9.4 and numpy-0.9.5 drife Python 1 03-01-2006 05:59 PM



Advertisments