# About
This notebook was created to follow the sympy code generation tutorial at [this link](http://www.sympy.org/scipy-2017-codegen-tutorial/)


```python
from sympy import *
init_printing()
```


```python
pi.evalf(10)
```


```python
alpha, beta, gamma, x, y = symbols('alpha beta gamma x y')
alpha, beta
```


```python
f= Function('f')
```


```python
diff(sin(x+1)*cos(y), x, y)
```


```python
test = diff(f(x)+1,x)
test
```


```python
Md = Function('M_d')(x)
Md
```


```python
q1, q2, q3 = symbols('q_1 q_2 q_3')
q = Matrix([q1, q2, q3])
q
```


```python
acol = Matrix([q1**2+sin(q2), exp(q3), q2-q1])
J = acol.jacobian(q)
J
```


```python
n, m = symbols('n m', integer=True)
M = MatrixSymbol('M', n, m)
b = MatrixSymbol('b', m, 1)
M*b
```


```python
(M*b).T
```


```python
(M*b).T
```


```python
Transpose(M*b).doit()
```


```python
A = IndexedBase('A')
i = Idx('i')
A[2], A[i]
```

# Code printing


```python
x = symbols('x')
expr = abs(sin(x**2))
expr
```


```python
ccode(expr)
```




    'fabs(sin(pow(x, 2)))'




```python
tanh(x).rewrite(exp)
```

# make python functions from expressions the easy way


```python

```

af8d70a3299ca066e890d9c72997cf175352ff3f
ipynb
Jupyter Notebook
sympytest/Tutorial.ipynb
laurensvalk/devbots
dd7285774c0ec1a02fb30aaaaa9d396d6a680b3e
MIT
2020-05-19T11:06:46.000Z
2020-05-19T11:06:46.000Z
sympytest/Tutorial.ipynb
laurensvalk/devbots
dd7285774c0ec1a02fb30aaaaa9d396d6a680b3e
MIT
sympytest/Tutorial.ipynb
laurensvalk/devbots
dd7285774c0ec1a02fb30aaaaa9d396d6a680b3e
MIT
Qwen/Qwen-72B
1. YES
2. YES