Hi Ben,
Thanks for your prompt response.
On Wed, Feb 15, 2012 at 6:40 PM, Benjamin Root wrote:
>
>>
>> Rather than recarrays, I just use structured arrays like so:
>>
>> A = np.array([(0, 0), (0, 0), (0, 0), (0, 0)],
>> dtype=[('x', '>
>> I can then do:
>>
>> A['x'][0]
>>
>> Or
>>
On Wednesday, February 15, 2012, Benjamin Root wrote:
>
>
> On Wednesday, February 15, 2012, David Gowers (kampu) <00a...@gmail.com>
wrote:
>> Hi all,
>>
>> This email is about the difference, given a recarray 'arr',
>> between
>>
>>
>> A)
>>
>> arr.foo.x[0]
>>
>> and B)
>>
>> arr.foo[0].x
>>
>>
On Wednesday, February 15, 2012, David Gowers (kampu) <00a...@gmail.com>
wrote:
> Hi all,
>
> This email is about the difference, given a recarray 'arr',
> between
>
>
> A)
>
> arr.foo.x[0]
>
> and B)
>
> arr.foo[0].x
>
>
>
> Specifically, form A returns the 0-th x value, whereas form B raises
> A
Hi all,
This email is about the difference, given a recarray 'arr',
between
A)
arr.foo.x[0]
and B)
arr.foo[0].x
Specifically, form A returns the 0-th x value, whereas form B raises
AttributeError:
Some code demonstrating this:
>>> arr = np.zeros((4,), dtype = [('foo',[('x','H'),('y','H