sympy / scipy-2017-codegen-tutorial

SymPy code generation tutorial at SciPy 2017
http://www.sympy.org/scipy-2017-codegen-tutorial/
Other
61 stars 26 forks source link

Notes from Kenny's practice delivery #20

Closed moorepants closed 6 years ago

moorepants commented 7 years ago
11:46 start
11:49 learning obj
11:50 intro to cython
11:54 first exercise
11:57 showing exercise solution
11:59 section 2 start
explain what render_pyxld is and what pyxbld is, sow file?
explain what float/double mean, why doe float64_t mean "double"
explain the <double *> x.data syntax
x.data has to be cast from char to double
why is the wrapped c code slower?
12:08 Using codegen() to generate C code
i feel lke i haven't typed anything in a while right now
can do states.tolist() but you get list of lists
the pointer to the array is differen than explicit array declarations in
previous notebook, maybe nee dto be consistent
12:14 wrapping the generated code with cython
12:15 exercise
12:18 jason finished exercise
12:18 kenny explains the solution
12:22 section 3 generating...
autowrap should take multiple expressionsthe exercise here could be doing
autowrap on the jacobian and adding to odeint call?
autowrapped functions should have a nice docstring and signature
12:28 exercise start
12:29 jason done with exercise
12:31 exercise soluiton explain done
12:31 custom lib section
show documentation for fastpow.h
explain that you downloaded this c file
use self._print in custom printer
might be worth making this an exercise
show autowrap docstring that epxlains you can pass in a custom printer
i think you should just download the fastexp lib in the current dir
12:36 done with explanation of the last
bjodah commented 7 years ago

If casting using Cythons syntax (<double*>dY.data) is confusing we could alternatively just write &dY[0].

Integration using CustomPrinter (fastexp) is diverging on my machine.