コード例 #1
0
ファイル: test_chebyshev.py プロジェクト: 0x60/yhack2017
 def test_chebdiv(self):
     for i in range(5):
         for j in range(5):
             msg = "At i=%d, j=%d" % (i, j)
             ci = [0]*i + [1]
             cj = [0]*j + [1]
             tgt = cheb.chebadd(ci, cj)
             quo, rem = cheb.chebdiv(tgt, ci)
             res = cheb.chebadd(cheb.chebmul(quo, ci), rem)
             assert_equal(trim(res), trim(tgt), err_msg=msg)
コード例 #2
0
ファイル: test_chebyshev.py プロジェクト: glimmercn/numpy
 def test_chebdiv(self) :
     for i in range(5) :
         for j in range(5) :
             msg = "At i=%d, j=%d" % (i,j)
             ci = [0]*i + [1]
             cj = [0]*j + [1]
             tgt = cheb.chebadd(ci, cj)
             quo, rem = cheb.chebdiv(tgt, ci)
             res = cheb.chebadd(cheb.chebmul(quo, ci), rem)
             assert_equal(trim(res), trim(tgt), err_msg=msg)
コード例 #3
0
ファイル: __init__.py プロジェクト: Bankq/CS6998
def chebdiv(c1, c2):
    from numpy.polynomial.chebyshev import chebdiv
    return chebdiv(c1, c2)
コード例 #4
0
ファイル: __init__.py プロジェクト: 1950/sawbuck
def chebdiv(c1, c2):
    from numpy.polynomial.chebyshev import chebdiv
    return chebdiv(c1, c2)