repo.or.cz
/
sympy.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added a warning when constructing a Matrix without bracket + test modified
[sympy.git]
/
examples
/
trees.py
blob
7e8220861868b35f066651e45cfe5acbd3dd3c90
1
#!/usr/bin/env python
2
import
iam_sympy_example
3
4
from
sympy
import
*
5
6
def
T
(
x
):
7
return
x
+
x
**
2
+
2
*
x
**
3
+
4
*
x
**
4
+
9
*
x
**
5
+
20
*
x
**
6
+
48
*
x
**
7
+
\
8
115
*
x
**
8
+
286
*
x
**
9
+
719
*
x
**
10
9
10
def
A
(
x
):
11
return
1
+
T
(
x
) -
T
(
x
)**
2
/
2
+
T
(
x
**
2
)/
2
12
13
14
x
=
Symbol
(
"x"
)
15
s
=
Poly
(
A
(
x
),
x
)
16
num
= [
s
.
coeff
(
n
)
for
n
in
range
(
11
)]
17
18
print
s
.
as_basic
()
19
print
num