[SciPy-dev] semi-duplicated code in minpack/multipack.h files

Zachary Pincus zachary.pincus@yale....
Fri Aug 15 13:35:56 CDT 2008


Hi all,

In looking into (properly) fixing the uses of PyArray_FromDims in  
scipy.interpolate, I noticed that the following header files are  
nearly identical (I assume the desire to have multiple copies of the  
same file is to keep each of the scipy sub-packages completely  
independent):

scipy/integrate/multipack.h
scipy/interpolate/multipack.h
scipy/optimize/minpack.h

Anyhow, various of these what look like bug fixes which others don't.  
Also, many of the macros defined in this header are rather problematic  
in that they rely on certain variables being defined in the code  
around the macro (despite the fact that the macros have arguments).  
See. e.g.
#define SET_DIAG(ap_diag,o_diag,mode) {

which depends on a variable named 'n' being available.

Any suggestions as to what to do here? Should I try to synch up the  
files and fix the macros? This is kind of delicate stuff, in terms of  
retaining portability, etc.

Zach


More information about the Scipy-dev mailing list