Python numpy 模块,polydiv() 实例源码

我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用numpy.polydiv()

项目:radar    作者:amoose136    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:radar    作者:amoose136    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)
项目:krpcScripts    作者:jwvanderbeck    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:krpcScripts    作者:jwvanderbeck    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)
项目:aws-lambda-numpy    作者:vitolimandibhrata    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:aws-lambda-numpy    作者:vitolimandibhrata    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)
项目:lambda-numba    作者:rlhotovy    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:lambda-numba    作者:rlhotovy    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)
项目:deliver    作者:orchestor    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:deliver    作者:orchestor    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def test_poly_div(self, level=rlevel):
        # Ticket #553
        u = np.poly1d([1, 2, 3])
        v = np.poly1d([1, 2, 3, 4, 5])
        q, r = np.polydiv(u, v)
        assert_equal(q*v + r, u)
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def test_polydiv_type(self):
        # Make polydiv work for complex types
        msg = "Wrong type, should be complex"
        x = np.ones(3, dtype=np.complex)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.complex, msg)
        msg = "Wrong type, should be float"
        x = np.ones(3, dtype=np.int)
        q, r = np.polydiv(x, x)
        assert_(q.dtype == np.float, msg)