Esempio n. 1
0
 def test_cheb(self, dist):
     import pyhetdex.ltl.chebyshev as cheby
     x = (dist._scal_x(100), dist._scal_x(1000))
     y = [dist._scal_f(20), dist._scal_f(220)]
     if dist.version == 14:
         assert np.isclose(cheby.interpCheby2D_7(x, y, dist.fy_par_.data),
                           np.array([18.6529, 217.801])).all()
     else:
         assert np.isclose(cheby.interpCheby2D_7(x, y, dist.fy_par_.data),
                           np.array([14.9945, 212.873])).all()
Esempio n. 2
0
 def interp(self, x, y, par):
     return cheby.interpCheby2D_7(x, y, par)
Esempio n. 3
0
def test_interpCheby2D_7(x, y):
    val = cheby.interpCheby2D_7(x, y, np.ones(36))

    nm = chebvander2d(np.array(x), np.array(y), [7, 7])[:, index_map]

    assert (val == nm.sum(axis=1)).all()