I create a matlab duration object and save it to a .mat file:
timeend = seconds(123);
save('time.mat', timeend, '-v7.3');
Then I read it from python:
with h5py.File('time.mat', 'r') as f:
var = f['timeend'][:]
print(list(var))
Then var
is a np object:
[array([3707764736, 2, 1, 1, 1,
1], dtype=uint32)]
How to convert this numpy array to a timedelta object or an np.array of the time in seconds?