[Numpy-discussion] Proposal: add ndarray.keys() to return dtype.names

John Zwinck jzwinck at gmail.com
Wed Oct 1 10:08:54 EDT 2014

On 1 Oct 2014 04:30, "Stephan Hoyer" <shoyer at gmail.com> wrote:
> On Tue, Sep 30, 2014 at 1:22 PM, Eelco Hoogendoorn <
hoogendoorn.eelco at gmail.com> wrote:
>> On more careful reading of your words, I think we agree; indeed, if
keys() is present is should return an iterable; but I don't think it should
be present for non-structured arrays.
> Indeed, I think we do agree. The attribute can simply be missing (e.g.,
accessing it raises AttributeError) for non-structured arrays.

I'm generally fine with this, though I would like to know if there is
precedent for methods being present on structured arrays only.  Even if
there is no precedent I am still OK with the idea, I just think we should
understand if how novel this will be.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141001/f1a9a782/attachment.html>

More information about the NumPy-Discussion mailing list