def get_single_feature()

in videoalignment/datasets.py [0:0]


    def get_single_feature(self, v, pad=True):
        fps = self.get_fps(v)
        ts = self.get_video_feature(v)

        if self.pad and pad:
            if ts.shape[0] > self.length:
                # warnings.warn('I have rescaled a feature vector!')
                ts = ts[: self.length]

            offset = self.length - ts.shape[0]
            if offset > 0:
                ts = np.concatenate([ts, np.zeros([offset] + list(ts.shape[1:]))])

        xs = get_timestamps(fps, self.fps, ts.shape[0]) * self.fps
        return ts.astype(np.float32), xs.astype(np.float32)