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,
>
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)
>
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