Here is a function written in C which uses HDF5 library:
static void set_attr_ftuple(h5_dataspaces_t *ds, hid_t obj, const char *name, float *f) { hid_t a