Skip to content

Commit

Permalink
fix(preprocessing): use built-in round instead of trying (and faili…
Browse files Browse the repository at this point in the history
…ng) to import from `math`
  • Loading branch information
ruancomelli committed Jul 14, 2021
1 parent 6ae3671 commit 66d4853
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions boiling_learning/preprocessing/ExperimentVideo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import math
import operator
from datetime import timedelta
from pathlib import Path
Expand Down Expand Up @@ -270,16 +269,14 @@ def data(self, data: VideoData) -> None:
if data.start_index is not None:
self.start = data.start_index
elif data.start_elapsed_time is not None:
self.start = math.round(
self.start = round(
data.start_elapsed_time.total_seconds() * data.fps
)

if data.end_index is not None:
self.end = data.end_index
elif data.end_elapsed_time is not None:
self.end = math.round(
data.end_elapsed_time.total_seconds() * data.fps
)
self.end = round(data.end_elapsed_time.total_seconds() * data.fps)

def open_video(self) -> None:
# decord.bridge.set_bridge('tensorflow')
Expand Down

0 comments on commit 66d4853

Please sign in to comment.