當前位置: 首頁>>代碼示例>>Python>>正文


Python Polynomial.derivative方法代碼示例

本文整理匯總了Python中polynomial.Polynomial.derivative方法的典型用法代碼示例。如果您正苦於以下問題:Python Polynomial.derivative方法的具體用法?Python Polynomial.derivative怎麽用?Python Polynomial.derivative使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在polynomial.Polynomial的用法示例。


在下文中一共展示了Polynomial.derivative方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __getattr__

# 需要導入模塊: from polynomial import Polynomial [as 別名]
# 或者: from polynomial.Polynomial import derivative [as 別名]
    def __getattr__(self, name):
        self.atime= time.ctime()
        return getattr(self._obj, name)

    def __setattr__(self, name, value):
        if name not in ['ctime', 'atime', 'mtime', '_obj']:
            object.__setattr__(self, 'mtime',time.ctime())
            object.__setattr__(self._obj, name, value)
        else:
            object.__setattr__(self, name, value)

    
if __name__ == '__main__':
    p = Polynomial((1,2), (3,4))
    print(p)
    p = proxy(p)
    q = p.derivative()
    print(q)
    
    print(p.ctime, p.mtime, p.atime, sep='\n')
    
    bob = Person('Hope', 'Bob')
    bob = proxy(bob)
    print(bob.lastName)
    
    san_diego = proxy('san diego')
    print(san_diego.upper())
    for i in range(100000): i*i
    p.x = 3
    print(p.ctime, p.mtime, p.atime, sep='\n')
開發者ID:JperF,項目名稱:OODP_python,代碼行數:32,代碼來源:proxy.py

示例2: __init__

# 需要導入模塊: from polynomial import Polynomial [as 別名]
# 或者: from polynomial.Polynomial import derivative [as 別名]
 def __init__(self,t0,t1,p):
     p=Polynomial(p)
     v=p.derivative()
     a=v.derivative()
     j=a.derivative()
     super(SegmentPoly, self).__init__(t0,t1,(p,v,a,j))
開發者ID:JustinTArthur,項目名稱:Goulib,代碼行數:8,代碼來源:motion.py


注:本文中的polynomial.Polynomial.derivative方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。