本文整理匯總了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')
示例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))