Open LaurentBlanc73 opened 3 months ago
Hi @ratal, I really like the package. What do you think of my suggestion? It works perfectly for me :) I'm looking forward hearing from you
@LaurentBlanc73 Thanks for your proposal. Indeed, it seems that pandas do not like non native byte order. Could you please submit a Pull Request ?
@ratal thanks for getting back to me so quickly. Pull Request is submitted :)
Python version
3.9.2
Numpy version
1.26.1
mdfreader version
4.1
Description
Got the error:
Big-endian buffer not supported on little-endian compiler
when working with the generated dataframe. The last two lines of the following code evoked the error:The file type is .MDF
Resolution:
Added the following lines in line 1533 of mdfreader.py.
The if clause checks, if data is in the native byte order (or not applicable). If this is not the case, the second line gets executed which changes the byteorder.
It would be really useful if this would be implemented. Maybe there is another function for which it is also applicable (convert_to_pandas maybe?).
Sources:
https://tedboy.github.io/pandas/gotchas/gotchas10.html https://numpy.org/doc/stable/reference/generated/numpy.dtype.byteorder.html