[SciPy-Dev] Make orthogonal eval_* ufuncs?
Sun Oct 7 06:19:17 CDT 2012
22.09.2012 19:45, Eric Moore kirjoitti:
> There are some issues with the eval_* routines for orthogonal polynomials.
> 1. They appear to support out parameters, but they don't.
> 2. They choke when handed lists rather than arrays. (This is ticket #1435)
> 3. special.binom is exported but doesn't appear in the docs on scipy.org.
> I started to fix these issues this morning by turning them into ufuncs
> and calling hyp2f1, Gamma and lgam from cephes.h and hyp1f1_wrap from
> specfun_wrappers.h directly. However the various error handling
> routines defined in _cephesmodule.c (line 1185+) are actually called in
> cephes/mtherr.c. This means that I can't actually do it that way,
> unless I move some things around. I'd propose moving all of the eval_*
> functions defined in orthogonal_eval.pyx to _cephesmodule.c and turning
> them all into ufuncs.
This might be useful.
There's a pull request currently that tries to make the organization and
adding more ufuncs easier:
Once this is merged, you can write the kernel functions of the ufunc
loops in orthogonal_eval.pxd directly in Cython, by using the usual
Cython C interface to deal with Cephes et al.
The drawback here is that you need separate kernel functions for
Or, if you want so start right away, you can work on a branch based on
git remote add pv git://github.com/pv/scipy-work.git
git fetch pv
git checkout -b my-ortheval-fixes pv/special-cleanup
More information about the SciPy-Dev