[SciPy-user] patches for scipy_core-0.4.2

Ted Horst ted.horst at earthlink.net
Wed Oct 19 22:46:36 CDT 2005


Here are 2 patches for scipy_core-0.4.2.

The first is on scipy/base/src/arraytypes.in.src.  It corrects a  
casting problem from longdouble to other types:

*** arraytypes.inc.src.orig     Wed Oct 19 09:11:11 2005
--- arraytypes.inc.src  Tue Oct 18 09:23:56 2005
***************
*** 373,379 ****
    
#from=BYTE*13,UBYTE*13,SHORT*13,USHORT*13,INT*13,UINT*13,LONG*13,ULONG*1 
3,LONGLONG*13,ULONGLONG*13,FLOAT*13,DOUBLE*13,LONGDOUBLE*13,CFLOAT*13,CD 
OUBLE*13,CLONGDOUBLE*13#
   #totyp=(byte, ubyte, short, ushort, int, uint, long, ulong, longlong,  
ulonglong, float, double, longdouble)*16#
   #fromtyp=byte*13, ubyte*13, short*13, ushort*13, int*13, uint*13,  
long*13, ulong*13, longlong*13, ulonglong*13, float*13, double*13,  
longdouble*13, float*13, double*13, longdouble*13#
! #incr= ip++*166,ip+=2*42#
   */
   static void
   @from at _to_@to@(@fromtyp@ *ip, @totyp@ *op, intp n, PyArrayObject *aip,
--- 373,379 ----
    
#from=BYTE*13,UBYTE*13,SHORT*13,USHORT*13,INT*13,UINT*13,LONG*13,ULONG*1 
3,LONGLONG*13,ULONGLONG*13,FLOAT*13,DOUBLE*13,LONGDOUBLE*13,CFLOAT*13,CD 
OUBLE*13,CLONGDOUBLE*13#
   #totyp=(byte, ubyte, short, ushort, int, uint, long, ulong, longlong,  
ulonglong, float, double, longdouble)*16#
   #fromtyp=byte*13, ubyte*13, short*13, ushort*13, int*13, uint*13,  
long*13, ulong*13, longlong*13, ulonglong*13, float*13, double*13,  
longdouble*13, float*13, double*13, longdouble*13#
! #incr= ip++*169,ip+=2*39#
   */
   static void
   @from at _to_@to@(@fromtyp@ *ip, @totyp@ *op, intp n, PyArrayObject *aip,


The second patch is on scipy/base/src/umathmodule.c.src.  It corrects a  
compilation problem on Mac OSX 10.3 (or other platforms that don't have  
long double functions).  The inverse hyperbolic float and long dboule  
functions are accounted for twice, once in the generic float and long  
double templates and then again in a special ifdef section.  The patch  
removes these functions from the generic templates:

*** umathmodule.c.src.orig      Wed Oct 19 09:10:39 2005
--- umathmodule.c.src   Tue Oct 18 09:34:14 2005
***************
*** 178,187 ****

   /**begin repeat

!  
#kind=(sin,cos,tan,sinh,cosh,tanh,fabs,floor,ceil,sqrt,log10,log,exp,asi 
n,acos,atan,asinh,acosh,atanh)*2#
! #typ=longdouble*19, float*19#
! #c=l*19,f*19#
! #TYPE=LONGDOUBLE*19, FLOAT*19#
   */
   #ifndef HAVE_ at TYPE@_FUNCS
   @typ@ @kind@@c@(@typ@ x) {
--- 178,187 ----

   /**begin repeat

!  
#kind=(sin,cos,tan,sinh,cosh,tanh,fabs,floor,ceil,sqrt,log10,log,exp,asi 
n,acos,atan)*2#
! #typ=longdouble*16, float*16#
! #c=l*16,f*16#
! #TYPE=LONGDOUBLE*16, FLOAT*16#
   */
   #ifndef HAVE_ at TYPE@_FUNCS
   @typ@ @kind@@c@(@typ@ x) {



More information about the SciPy-user mailing list