actipy icon indicating copy to clipboard operation
actipy copied to clipboard

handle files where timestamps have tz

Open chanshing opened this issue 3 months ago • 0 comments

Numpy np.dtype does not support timestamps with tz:

  File ".../actipy/src/actipy/processing.py", line 561, in mmap_like
    dtype = np.dtype([
TypeError: Cannot interpret 'datetime64[ns, UTC]' as a data type

Test file:

time,x,y,z
2024-02-29T22:00:05.672174Z,-0.758056640625,0.364013671875,0.598876953125
2024-02-29T22:00:05.682174Z,-0.7578125,0.36327630889886,0.597167145233143
2024-02-29T22:00:05.692174Z,-0.757810847165282,0.361814753415282,0.596943662141614
2024-02-29T22:00:05.702174Z,-0.75755845381054,0.36155245449608,0.599841133669425
2024-02-29T22:00:05.712174Z,-0.756591796875,0.359632363302743,0.598622895491693
2024-02-29T22:00:05.722174Z,-0.756595926041592,0.360599832291592,0.597912778124776
2024-02-29T22:00:05.732174Z,-0.756885465322301,0.36083984375,0.59859814302439
2024-02-29T22:00:05.742174Z,-0.759259997746071,0.360920791768336,0.596900700119761
2024-02-29T22:00:05.752174Z,-0.758531710562023,0.364244601187023,0.596072773098281

chanshing avatar Mar 20 '24 17:03 chanshing