Menu

[r3949]: / trunk / course / examples / scipy / example2.2  Maximize  Restore  History

Download this file

14 lines (14 with data), 226 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
>>> p = poly1d([3,4,5])
>>> print p
2
3 x + 4 x + 5
>>> print p*p
4 3 2
9 x + 24 x + 46 x + 40 x + 25
>>> print p.integ(k=6)
3 2
x + 2 x + 5 x + 6
>>> print p.deriv()
6 x + 4
>>> p([4,5])
array([ 69, 100])
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.