def _apply(self, input): device = backend.get_device(input) with device: return util.downsample(input, self.factors, shift=self.shift)
def _apply(self, input): return util.downsample(input, self.factors, shift=self.shift)
def test_downsample(self): x = np.array([1, 2, 3, 4, 5]) y = util.downsample(x, [2]) npt.assert_allclose(y, [1, 3, 5])