[Numpy-discussion] dtype "metadata" attribute

Andrew Collette andrew.collette at gmail.com
Thu Sep 5 13:13:50 EDT 2013


Hi,

We have a pull request pending at the h5py project to use the dtype
"metadata" attribute to implement special type support, as opposed to
the current hacked-together solution based on field names:

>>> dt = dtype('i', metadata={"key": 42})
>>> dt.metadata
<dictproxy {'key': 42}>

However, I can't find documentation on it anywhere; the "metadata"
keyword doesn't even appear in the dtype docstring.  Is this an
officially supported feature in NumPy?  I am mostly concerned about it
going away in a future release.

Thanks!
Andrew Collette



More information about the NumPy-Discussion mailing list