Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/c/e/CellProfiler-HEAD/cellprofiler/modules/tests/test_resize.py   CellProfiler(Download)
        expected[:,:,0] = i
        expected[:,:,1] = j
        workspace, module = self.make_workspace(image, R.R_BY_FACTOR, 
                                                R.I_NEAREST_NEIGHBOR)
        module.resizing_factor.value = 3.0
        i,j = (np.mgrid[0:30,0:30].astype(float) * 9.0 / 29.0 + .5).astype(int)
        expected =  i
        workspace, module = self.make_workspace(image, R.R_BY_FACTOR, 
                                                R.I_NEAREST_NEIGHBOR)
        module.resizing_factor.value = 3.0
    def test_02_03_third(self):
        i,j = np.mgrid[0:30,0:30]
        image = i.astype(float)
        expected = (np.mgrid[0:10,0:10][0].astype(float) * 29.0/9.0+.5).astype(int)
        workspace, module = self.make_workspace(image, R.R_BY_FACTOR, 
    def test_03_01_bilinear(self):
        i,j = np.mgrid[0:10,0:10]
        image = i.astype(np.float32)
        expected = np.mgrid[0:30,0:30][0].astype(np.float32) * 9.0/29.0
        workspace, module = self.make_workspace(image, R.R_BY_FACTOR, 
        upper_bound[odd_mask] = (upper_bound[np.maximum(i-1,0), j] + 
                                 upper_bound[np.minimum(i+1,18),j])[odd_mask]/2
        workspace, module = self.make_workspace(image, R.R_BY_FACTOR, 
                                                R.I_BICUBIC)
        module.resizing_factor.value = 19.0/10.0