diff --git a/vidaug/augmentors/temporal.py b/vidaug/augmentors/temporal.py index 606e0ca..592da11 100644 --- a/vidaug/augmentors/temporal.py +++ b/vidaug/augmentors/temporal.py @@ -130,7 +130,7 @@ def __init__(self , ratio=1.0): self.ratio = ratio def __call__(self, clip): - nb_return_frame = np.floor(self.ratio * len(clip)) + nb_return_frame = int(np.floor(self.ratio * len(clip))) return_ind = [int(i) for i in np.linspace(1, len(clip), num=nb_return_frame)] return [clip[i-1] for i in return_ind] @@ -150,7 +150,7 @@ def __init__(self , ratio=1.0): self.ratio = ratio def __call__(self, clip): - nb_return_frame = np.floor(self.ratio * len(clip)) + nb_return_frame = int(np.floor(self.ratio * len(clip))) return_ind = [int(i) for i in np.linspace(1, len(clip), num=nb_return_frame)] return [clip[i-1] for i in return_ind]