I want to write this attribute using h5py, but I cannot figure out how. If I simply do:
dset.attrs['attribute'] = [3, 3, 3]
for example, then the attribute is created as integers with a dataspace of [3]. I think I need it to be an array datatype with dataspace [1]. I have also tried:
I’m not sure if it’s best to reply here to my own thread or make a new one, but anyway:
Does anyone have a suggestion for how to do the equivalent to the above in Matlab? A collaborator is trying to write a file for me from Matlab, and I don’t use it much anymore. We are struggling to create the array attribute correctly.