Provides access to the low-level HDF5 “H5A” attribute interface.
Create a new attribute, attached to an existing object.
Open an attribute attached to an existing object. You must specify exactly one of either name or idx. Keywords are:
INT index_type (h5.INDEX_NAME)
INT order (h5.ITER_NATIVE)
Determine if an attribute is attached to this object. Keywords:
Rename an attribute. Keywords:
Remove an attribute from an object. Specify exactly one of “name” or “index”. Keyword-only arguments:
INT index_type (h5.INDEX_NAME)
INT order (h5.ITER_NATIVE)
Determine the number of attributes attached to an HDF5 object.
Get information about an attribute, in one of two ways:
Iterate a callable (function, method or callable object) over the attributes attached to this object. You callable should have the signature:
func(STRING name) => Result
or if the keyword argument “info” is True:
func(STRING name, AttrInfo info) => Result
Returning None continues iteration; returning anything else aborts iteration and returns that value. Keywords:
Logical representation of an HDF5 attribute identifier.
Objects of this class can be used in any HDF5 function call which expects an attribute identifier. Additionally, all H5A* functions which always take an attribute instance as the first argument are presented as methods of this class.
A Numpy-stype dtype object representing the attribute’s datatype
Determine the name of this attribute.
Create and return a copy of the attribute’s dataspace.
Get the amount of storage required for this attribute.
Create and return a copy of the attribute’s datatype.
The attribute’s name
Read the attribute data into the given Numpy array. Note that the Numpy array must have the same shape as the HDF5 attribute, and a conversion-compatible datatype.
The Numpy array must be writable and C-contiguous. If this is not the case, the read will fail with an exception.
A Numpy-style shape tuple representing the attribute’s dataspace
Write the contents of a Numpy array too the attribute. Note that the Numpy array must have the same shape as the HDF5 attribute, and a conversion-compatible datatype.
The Numpy array must be C-contiguous. If this is not the case, the write will fail with an exception.