[Numpy-discussion] numpy.reshape() bug?

2009-09-28 Thread Chris
I am trying to collapse two dimensions of a 3-D array, using reshape: (Pdb) dims = np.shape(trace) (Pdb) dims Out[2]: (1000, 4, 3) (Pdb) newdims = (dims[0], sum(dims[1:])) (Pdb) newdims Out[2]: (1000, 7) However, reshape seems to think I am missing something: (Pdb) np.reshape(trace, newdims)

Re: [Numpy-discussion] numpy.reshape() bug?

2009-09-28 Thread Neil Martinsen-Burrell
On 2009-09-28 15:39 , Chris wrote: I am trying to collapse two dimensions of a 3-D array, using reshape: (Pdb) dims = np.shape(trace) (Pdb) dims Out[2]: (1000, 4, 3) (Pdb) newdims = (dims[0], sum(dims[1:])) (Pdb) newdims Out[2]: (1000, 7) However, reshape seems to think I am missing