On Fri, 24 Jan 2014 17:30:33 +0100, Emanuele Olivetti wrote:
> I just came across this unexpected behaviour when creating
> a np.array() from two other np.arrays of different shape.
The tuple parsing for the construction of new numpy arrays is pretty
tricky/hairy, and doesn't always do exactly wha
On Fri, Jan 24, 2014 at 11:30 AM, Emanuele Olivetti
wrote:
> Hi,
>
> I just came across this unexpected behaviour when creating
> a np.array() from two other np.arrays of different shape.
> Have a look at this example:
>
> import numpy as np
> a = np.zeros(3)
> b = np.zeros((2,3))
> c = np.ze
Hi,
I just came across this unexpected behaviour when creating
a np.array() from two other np.arrays of different shape.
Have a look at this example:
import numpy as np
a = np.zeros(3)
b = np.zeros((2,3))
c = np.zeros((3,2))
ab = np.array([a, b])
print ab.shape, ab.dtype
ac = np.array([a, c],