Skip to content

Commit

Permalink
Use numpy casting instead of comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
domstoppable committed Oct 30, 2024
1 parent b4eca32 commit 5147507
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pupil_labs/automate_custom_events/control_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def run_modules(

video_for_gaze_module = pd.DataFrame({
"frames": np.arange(frames),
"pts": [int(pt) for pt in pts],
"pts": pts.astype(int),
"timestamp [ns]": ts_world,
})

Expand Down
2 changes: 1 addition & 1 deletion src/pupil_labs/automate_custom_events/read_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_baseframes(video_path, audio=False, auto_thread_type=True):
timestamps_s = ts / 1e9
video_df = pd.DataFrame({
"frames": np.arange(nframes),
"pts": [int(pt) for pt in pts],
"pts": pts.astype(int),
"timestamp [ns]": ts,
"timestamp [s]": timestamps_s
})
Expand Down

0 comments on commit 5147507

Please sign in to comment.