本文整理汇总了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))