I have been using the h5py module to input a large MATLAB file, however, I am having some issues with my data, namely accessing specific values from the cell structure and the alphabetical ordering which the module seems to have applied.
I was using the .value function to access specific values which was working fine, however, this has now been deprecated and am now having issues when accessing specific values. In order to circumvent the issue of ordering I have have tried to use track_order = True and set this globally however, this did not solve the problem.
import h5py
import numpy as np
h5py.get_config().track_order=True
myfile = h5py.File('C:/largetempdata.mat',track_order=True)
ref1 = myfile['Day']
ref2 = ref1['Experiment number']
ref3 = ref2['Time']
ref3['midday_data'][()]
At the moment the ref3['midday_data'][()]
which outputs
array([[<HDF5 object reference>], dtype=object)
as opposed to the actual value which I need to then use further down in the code.
In terms of the ordering labels are being put into alphabetical order, for example I am getting:
['Agroup_data', 'Cgroup_data' 'Miscellaneous', 'Zgroup_data']
instead of the actual ordering present in the .mat file:
['A_group_data', 'C_group_data','Z_group_data','Miscellaneous', ]
Any help or advice with these issues would be greatly appreciated.