[CppAD] pycppad and numpy.linalg

Brad Bell bradbell at apl.washington.edu
Thu Jul 30 17:52:45 EDT 2009


The question below refers to the pycppad library which is a connection between 
Python and CppAD; see
 	http://www.seanet.com/~bradbell/pycppad/index.xml

There should be some type independent linear algebra solvers already coded in 
Python (does anyone on this list know of one ?), but I did not know where to 
find them.

I have provided a type independent solver as an example of how to do this in 
C++ (that you could convert to python). See
 	http://www.coin-or.org/CppAD/Doc/ludetandsolve.xml

More generally, ublas provides for type independent linear algebra in C++ and 
works fine with CppAD; see
http://www.boost.org/doc/libs/1_39_0/libs/numeric/ublas/doc/index.htm


On Thu, 30 Jul 2009, Stefan Schmidt wrote:

> Dear Dr. Bell,
> I have a short question concerning the pycppad library.
> My code contains calls of numpy's linear algebra functions like pinv() or 
> inv(), which require the array data type to be floats, because of the 
> underlying BLAS implementation. In another place, the code uses scipy's 
> nd-image interpolation, which also doesn't accept "a_float" inputs.
> 
> How would one work around such "third party" function blocks? Reimplement the 
> functionality in pure python? In case of the image interpolation, I could 
> also compute image gradients and use them to compute further required 
> derivatives, but is it possible at all to plug in such derivatives, or 
> analytically obtained ones, within a sequence of operations that pycppad is 
> analyzing?
> 
> Your comment on this issue would help me very much.
> With kind regards,
> Stefan Schmidt
> 
> --



More information about the CppAD mailing list