FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

dtypes with invalid names should raise an exception (Trac #210) · Issue #808 · numpy/numpy · GitHub

/ numpy Public

dtypes with invalid names should raise an exception (Trac #210) #808

Description

Original ticket http://projects.scipy.org/numpy/ticket/210 on 2006-07-28 by @alberts, assigned to unknown.

Trying to construct the following dtype should probably raise a !TypeError:

#!python
dt = N.dtype({'names':[123],'formats':[N.intc]})

If not, one can create an array but not access its fields:

#!python
In [2]: import numpy as N

In [3]: dt = N.dtype({'names':[123],'formats':[N.intc]})

In [4]: x = N.empty((5,), dt)

In [5]: x[123]

IndexError: index out of bounds

Tested with !NumPy 1.0b2.dev2915.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL