[Numpy-discussion] changing ValueError to KeyError for bad field access

Sturla Molden sturla.molden at gmail.com
Fri Jun 12 13:59:54 EDT 2015

On 12/06/15 19:46, Allan Haldane wrote:

>      >>> a = np.ones(3, dtype=[('a', 'f4'), ('b', 'f4')])
>      >>> a['c']
>      KeyError: 'c'

> Any opinions?

Sounds good to me. But it will probably break someones code.


More information about the NumPy-Discussion mailing list