We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f3ec8c commit aac61b0Copy full SHA for aac61b0
movement/io/load_poses.py
@@ -682,11 +682,13 @@ def _ds_from_valid_data(data: ValidPosesDataset) -> xr.Dataset:
682
n_frames = data.position_array.shape[0]
683
n_space = data.position_array.shape[1]
684
# Create the time coordinate, depending on the value of fps
685
- time_coords = np.arange(n_frames, dtype=int)
686
- time_unit = "frames"
687
if data.fps is not None:
688
- time_coords = time_coords / data.fps
+ time_coords = np.arange(n_frames, dtype=float) / data.fps
689
time_unit = "seconds"
+ else:
+ time_coords = np.arange(n_frames, dtype=int)
690
+ time_unit = "frames"
691
+
692
DIM_NAMES = ValidPosesDataset.DIM_NAMES
693
# Convert data to an xarray.Dataset
694
return xr.Dataset(
0 commit comments