I have a timestamp Matrix with (72500, 1) dimension in MATLAB. I have written such a statement in MATLAB:
returnMatrix = datestr(M(:,1)/86400 + datenum(1970,1,1)- 4/24);
And I successfully get the output date matrix back as a return Matrix.
returnMatrix = ['29/06/2015',...,'06/07/2015']
In order to get the same output, I have written such a statement in Python:
returnMatrix = (M[:, 0] / 86400 + date.toordinal(date(1970, 1, 1)) + 366 - (4/24))
returnMatrix = np.apply_along_axis((lambda x:[date.fromtimestamp(x[0]).strftime("%d/%m/%y")]),1,returnMatrix)
But as an output, I get this result:
returnMatrix = ['09/01/1970',...,'09/01/1970']
How should I write the statement in order to get the output as the one in MATLAB?