[Numpy-discussion] indexing of rank-0 structured arrays: why not?
n.becker at amolf.nl
Mon Jan 10 13:15:13 EST 2011
your answer does work: after indexing with () I can then further index
into the datatype.
In : a_rank_0[()]
I guess I just found the fact confusing that a_rank_1 and a_rank_0
compare and print equal but behave differently under indexing.
More precisely if I do
In : b = a_rank_1
In : b.shape
In : a_rank_0 == b
In : b
works but a_rank_0 doesn't. I thought b is a rank-0 array which it
apparently is not since it can be indexed. So maybe b should fail for
More information about the NumPy-Discussion