def METHOD_NAME(self):
    def f(i, j):
        return float(i) ** 2 * math.sqrt(float(j))
    origin = (0, 0)
    shape = (3, 5)  # nrows, ncols
    fUL = f(0, 0)
    fUR = f(0, 4)
    fLL = f(2, 0)
    fLR = f(2, 4)
    a = bilinear(shape, fUL, fUR, fLR, fLL)
    # print '\n', a
    self.assertEqual(a[0, 0], fUL)
    self.assertEqual(a[0, -1], fUR)
    self.assertEqual(a[-1, -1], fLR)
    self.assertEqual(a[-1, 0], fLL)
    b = interpolate_block(origin, shape, f, grid=None)
    # print '\n', b
    self.assertTrue(numpy.max(b - a) < 0.000001)