示例#1
0
 def _apply(self, input):
     device = backend.get_device(input)
     with device:
         return util.upsample(input,
                              self.oshape,
                              self.factors,
                              shift=self.shift)
示例#2
0
文件: linop.py 项目: ShannonZ/sigpy
 def _apply(self, input):
     return util.upsample(input,
                          self.oshape,
                          self.factors,
                          shift=self.shift)
示例#3
0
 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])