Exemple #1
0
def test_natural_neighbor_to_grid(test_data, test_grid):
    r"""Test natural neighbor interpolation to grid function."""
    xp, yp, z = test_data
    xg, yg = test_grid

    img = natural_neighbor_to_grid(xp, yp, z, xg, yg)

    with get_test_data('nn_bbox0to100.npz') as fobj:
        truth = np.load(fobj)['img']

    assert_array_almost_equal(truth, img)
Exemple #2
0
def test_natural_neighbor_to_grid(test_data, test_grid):
    r"""Test natural neighbor interpolation to grid function."""
    xp, yp, z = test_data
    xg, yg = test_grid

    img = natural_neighbor_to_grid(xp, yp, z, xg, yg)

    with get_test_data('nn_bbox0to100.npz') as fobj:
        truth = np.load(fobj)['img']

    assert_array_almost_equal(truth, img)