1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
.. _attributes:
==========
Attributes
==========
Groups and datasets can have small bits of named information attached to them.
This is the official way to store metadata in HDF5. Each of these objects
has a small proxy object (:class:`AttributeManager`) attached to it as
``<obj>.attrs``. Attributes have the following properties:
- They may be created from any scalar or NumPy array
- Each attribute must be small (recommended < 64k for HDF5 1.6)
- There is no partial I/O (i.e. slicing); the entire attribute must be read.
They support the same dictionary API as groups.
Reference
---------
.. autoclass:: h5py.AttributeManager
.. automethod:: h5py.AttributeManager.__getitem__
.. automethod:: h5py.AttributeManager.__setitem__
.. automethod:: h5py.AttributeManager.__delitem__
.. automethod:: h5py.AttributeManager.create
.. automethod:: h5py.AttributeManager.modify
**Inherited dictionary interface**
.. automethod:: h5py.highlevel._DictCompat.keys
.. automethod:: h5py.highlevel._DictCompat.values
.. automethod:: h5py.highlevel._DictCompat.items
.. automethod:: h5py.highlevel._DictCompat.iterkeys
.. automethod:: h5py.highlevel._DictCompat.itervalues
.. automethod:: h5py.highlevel._DictCompat.iteritems
.. automethod:: h5py.highlevel._DictCompat.get
|