On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant wrote:
>
> On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
>
> > Consider the following code:
> >
> > import numpy as np
> > a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
> > a *= float(255) / 15
> >
> > In v1.6.x, this yields:
> > array([17, 34,
On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote:
> Consider the following code:
>
> import numpy as np
> a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
> a *= float(255) / 15
>
> In v1.6.x, this yields:
> array([17, 34, 51, 68, 85], dtype=int16)
>
> But in master, this throws an exception abou
Consider the following:
>>> import numpy as np
>>> np.__version__
'1.6.1'
>>> arr = np.asarray([[1, 2, 3]])
>>> arr["0"]
Traceback (most recent call last):
File "", line 1, in
arr["0"]
ValueError: field named 0 not found.
>>> arr["0",]
array([1, 2, 3])
>>> arr["0", 1]
2
>>> arr[0, "1"]
2
>
Consider the following code:
import numpy as np
a = np.array([1, 2, 3, 4, 5], dtype=np.int16)
a *= float(255) / 15
In v1.6.x, this yields:
array([17, 34, 51, 68, 85], dtype=int16)
But in master, this throws an exception about failing to cast via same_kind.
Note that numpy was smart about this o
Hi,
On Sun, Sep 9, 2012 at 6:12 PM, Frédéric Bastien wrote:
> The third is releated to change to the casting rules in numpy. Before
> a scalar complex128 * vector float32 gived a vector of dtype
> complex128. Now it give a vector of complex64. The reason is that now
> the scalar of different cate