I came across some strange behavior when multiplying numpy floats and python
lists: the list is returned unchanged:
In [18]: np.float64(1.2) * [1, 2]
Out[18]: [1, 2]
On the other hand, multiplying an array scalar and a python list gives the
expected answer
In [19]: np.array(1.2) * [1, 2]
On Jun 20, 2010, at 2:28 PM, Pauli Virtanen wrote:
su, 2010-06-20 kello 13:56 -0400, Tony S Yu kirjoitti:
I came across some strange behavior when multiplying numpy floats and
python lists: the list is returned unchanged:
In [18]: np.float64(1.2) * [1, 2]
Out[18]: [1, 2]
Probably
On May 25, 2010, at 10:57 PM, Charles R Harris wrote:
On Tue, May 25, 2010 at 8:21 PM, Tony S Yu tsy...@gmail.com wrote:
I got bit again by this bug with unsigned integers. (My original changes got
overwritten when I updated from svn and, unfortunately, merged conflicts
without
I got bit again by this bug with unsigned integers. (My original changes got
overwritten when I updated from svn and, unfortunately, merged conflicts
without actually looking over the changes.)
In any case, I thought it'd be a good time to bump the issue (with patch).
Cheers,
-Tony
PS: Just
Hi,
Functions that call _nanop (i.e. nan[arg]min, nan[arg]max) currently fail with
unsigned integers. For example:
np.nanmin(np.array([0, 1], dtype=np.uint8))
OverflowError: cannot convert float infinity to integer
It seems that unsigned integers don't get identified as integers in the
On Nov 2, 2009, at 11:09 AM, numpy-discussion-requ...@scipy.org wrote:
From: David Cournapeau courn...@gmail.com
Subject: [Numpy-discussion] 1.4.0: Setting a firm release date for 1st
december.
To: Discussion of Numerical Python numpy-discussion@scipy.org
Message-ID:
I ran into this weird behavior with astype(int)
In [57]: a = np.array(1E13)
In [58]: a.astype(int)
Out[58]: array(-2147483648)
I understand why large numbers need to be clipped when converting to
int (although I would have expected some sort of warning), but I'm
puzzled by the negative
On Dec 13, 2007, at 2:21 PM, Robert Kern wrote:
Tony S Yu wrote:
Hello,
This is something that's been bothering for awhile. When numpy raises
the following divide by zero error:
Warning: divide by zero encountered in double_scalars
is there a way to get a Traceback on where that warning