Re: [Numpy-discussion] converting standard array to record array

2011-09-03 Thread Bryce Ready
Ah, I see. So basically I need to prepend dimensions myself to make this work - makes sense. Might be nice if view could do that automatically, but this is workable. Thanks Josef! On Tue, Aug 30, 2011 at 9:49 PM, wrote: > On Tue, Aug 30, 2011 at 4:34 PM, Bryce Ready > wrote: > > Hello all, >

Re: [Numpy-discussion] converting standard array to record array

2011-08-30 Thread josef . pktd
On Tue, Aug 30, 2011 at 4:34 PM, Bryce Ready wrote: > Hello all, > > So i'm using numpy 1.6.0, and trying to convert a (4,4) numpy array of dtype > 'f8' into a record array of this dtype: > >> dt = np.dtype([('mat','(4,4)f8')]) > > Here is the code snippet: > >> In [21]: a = np.random.randn(4,4) >

[Numpy-discussion] converting standard array to record array

2011-08-30 Thread Bryce Ready
Hello all, So i'm using numpy 1.6.0, and trying to convert a (4,4) numpy array of dtype 'f8' into a record array of this dtype: dt = np.dtype([('mat','(4,4)f8')]) > Here is the code snippet: In [21]: a = np.random.randn(4,4) > > In [22]: a.view(dt) > and the resulting error: ValueError: new t