sidpy.hdf.hdf_utils.get_attributes¶
- sidpy.hdf.hdf_utils.get_attributes(h5_object, attr_names=None, strict=False)[source]¶
Returns attribute associated with some DataSet.
- Parameters:
h5_object (
h5py.Dataset
) – Dataset object reference.attr_names (str or
list
of str, optional. Default = all) – Name of attribute object to return.strict (bool, optional. Default = False) – If True - raises a KeyError if desired keys are not found. Else, raises warning instead. This is especially useful when attempting to read attributes with invalid names such as spaces on either sides of text.
- Returns:
att_dict – Dictionary containing (name,value) pairs of attributes
- Return type: