Beispiel #1
0
 def test_legsub(self) :
     for i in range(5) :
         for j in range(5) :
             msg = "At i=%d, j=%d" % (i, j)
             tgt = np.zeros(max(i, j) + 1)
             tgt[i] += 1
             tgt[j] -= 1
             res = leg.legsub([0]*i + [1], [0]*j + [1])
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Beispiel #2
0
 def test_legsub(self) :
     for i in range(5) :
         for j in range(5) :
             msg = "At i=%d, j=%d" % (i,j)
             tgt = np.zeros(max(i,j) + 1)
             tgt[i] += 1
             tgt[j] -= 1
             res = leg.legsub([0]*i + [1], [0]*j + [1])
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Beispiel #3
0
def legsub(c1, c2):
    from numpy.polynomial.legendre import legsub
    return legsub(c1, c2)
Beispiel #4
0
def legsub(c1, c2):
    from numpy.polynomial.legendre import legsub
    return legsub(c1, c2)