[Numpy-discussion] numarray cholesky solver ?
jmiller at stsci.edu
Mon Apr 18 06:38:21 CDT 2005
On Sun, 2005-04-17 at 23:43, Simon Burton wrote:
> On Fri, 15 Apr 2005 06:44:02 -0400
> Todd Miller <jmiller at stsci.edu> wrote:
> > On Fri, 2005-04-15 at 16:04 +1000, Simon Burton wrote:
> > > Hi,
> > >
> > > I see there is a cholesky_decomposition routine in numarray, but we are also needing the corresponding cholesky solver.
> > > Is this in the pipeline,
> > No. Most of the add-on subpackages in numarray, with the exception of
> > convolve, image, and nd_image, are ports from Numeric.
> Ok, thanks Todd; we will have a go at porting this solver then. If you have any more advice on how to get started with this
> that would be much appreciated.
If you're doing a port of something that already works for Numeric
chances are good that numarray's Numeric compatibility API will make
things "just work." In any case, be sure to use the compatibility API
since it's the easiest path forward to Numeric3 should that effort prove
successful (which I think it will).
Usually what's involved in porting from Numeric to numarray is just
making sure that the numarray files can be used rather than the Numeric
header files. I think the style we used for matplotlib, while not
fully general, is the simplest and best compromise:
In setup.py, you have to pass extra_compile_args=["-DNUMARRAY=1"] or
similar to the Extension() constructions to build for numarray. There
are more details we could discuss if you want to build for both Numeric
and numarray simultaneously.
Two limitations of the numarray Numeric compatible C-API are: (1) a
partially compatible array descriptor structure (PyArray_Descr) and (2)
the UFunc C-API. Generally, neither of those is an issue, but for
large projects (e.g. scipy) they matter.
Good luck porting. Feel free to ask questions either on the list or
privately if you run into trouble.
More information about the Numpy-discussion