logo       

A bug in creating array of long int.: msg#00056

python.numeric.general

Subject: A bug in creating array of long int.

I got the following strange value when converting a long integer into
numarray. I spent some time in tracking it down in my program.
Is it a bug or an expected one? Thanks.

>>> array([True])
array([1], type=Bool)
>>> array([1])
array([1])
>>> array([1L]) # How about preserving long int type?
array([1])
>>> array([10000000000000000L])
array([1874919424]) # Oops. The value is changed without any notice.

--
Daehyok Shin (Peter)




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise