当前位置: 首页>>代码示例>>Python>>正文


Python PiecewisePolynomial.derivatives方法代码示例

本文整理汇总了Python中scipy.interpolate.PiecewisePolynomial.derivatives方法的典型用法代码示例。如果您正苦于以下问题:Python PiecewisePolynomial.derivatives方法的具体用法?Python PiecewisePolynomial.derivatives怎么用?Python PiecewisePolynomial.derivatives使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在scipy.interpolate.PiecewisePolynomial的用法示例。


在下文中一共展示了PiecewisePolynomial.derivatives方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_derivatives

# 需要导入模块: from scipy.interpolate import PiecewisePolynomial [as 别名]
# 或者: from scipy.interpolate.PiecewisePolynomial import derivatives [as 别名]
 def test_derivatives(self):
     P = PiecewisePolynomial(self.xi, self.yi, 3)
     m = 4
     r = P.derivatives(self.test_xs, m)
     # print r.shape, r
     for i in xrange(m):
         assert_almost_equal(P.derivative(self.test_xs, i), r[i])
开发者ID:huard,项目名称:scipy-work,代码行数:9,代码来源:test_polyint.py

示例2: test_wrapper

# 需要导入模块: from scipy.interpolate import PiecewisePolynomial [as 别名]
# 或者: from scipy.interpolate.PiecewisePolynomial import derivatives [as 别名]
 def test_wrapper(self):
     P = PiecewisePolynomial(self.xi, self.yi)
     assert_almost_equal(P(self.test_xs), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs))
     assert_almost_equal(
         P.derivative(self.test_xs, 2), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs, der=2)
     )
     assert_almost_equal(
         P.derivatives(self.test_xs, 2), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs, der=[0, 1])
     )
开发者ID:huard,项目名称:scipy-work,代码行数:11,代码来源:test_polyint.py

示例3: test_derivatives

# 需要导入模块: from scipy.interpolate import PiecewisePolynomial [as 别名]
# 或者: from scipy.interpolate.PiecewisePolynomial import derivatives [as 别名]
    def test_derivatives(self):
        with warnings.catch_warnings():
            warnings.filterwarnings('ignore', category=DeprecationWarning)
            P = PiecewisePolynomial(self.xi,self.yi,3)

        m = 4
        r = P.derivatives(self.test_xs,m)
        #print r.shape, r
        for i in xrange(m):
            assert_almost_equal(P.derivative(self.test_xs,i),r[i])
开发者ID:hitej,项目名称:meta-core,代码行数:12,代码来源:test_polyint.py

示例4: test_wrapper

# 需要导入模块: from scipy.interpolate import PiecewisePolynomial [as 别名]
# 或者: from scipy.interpolate.PiecewisePolynomial import derivatives [as 别名]
    def test_wrapper(self):
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", category=DeprecationWarning)
            P = PiecewisePolynomial(self.xi, self.yi)

        assert_almost_equal(P(self.test_xs), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs))
        assert_almost_equal(
            P.derivative(self.test_xs, 2), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs, der=2)
        )
        assert_almost_equal(
            P.derivatives(self.test_xs, 2), piecewise_polynomial_interpolate(self.xi, self.yi, self.test_xs, der=[0, 1])
        )
开发者ID:BioSoundSystems,项目名称:scipy,代码行数:14,代码来源:test_polyint.py


注:本文中的scipy.interpolate.PiecewisePolynomial.derivatives方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。