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