Closed
Description
In numpy 1.11.0, trying to access an undefined field of a structured array raises ValueError, rather than IndexError as in version 1.8
a = np.empty(1,dtype=[('f','u4')])
a['g']
yields
ValueError Traceback (most recent call last)
in ()
----> 1 a['g']
ValueError: no field of name g
Is that a feature? In any case, shouldn't it raise lookup error instead.
Metadata
Metadata
Assignees
Labels
No labels