[Scipy-svn] r3494 - in trunk/scipy/special: . cephes docs

scipy-svn@scip... scipy-svn@scip...
Sat Nov 3 11:05:32 CDT 2007


Author: cookedm
Date: 2007-11-03 11:05:26 -0500 (Sat, 03 Nov 2007)
New Revision: 3494

Modified:
   trunk/scipy/special/cephes.h
   trunk/scipy/special/cephes/mconf.h
   trunk/scipy/special/cephes_doc.h
   trunk/scipy/special/docs/included_functions.html
   trunk/scipy/special/gendoc.py
   trunk/scipy/special/setup.py
   trunk/scipy/special/ufunc_extras.h
Log:
Add include guards to header files in scipy.special, and add them as dependencies to the appropiate extensions.


Modified: trunk/scipy/special/cephes/mconf.h
===================================================================
--- trunk/scipy/special/cephes/mconf.h	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/cephes/mconf.h	2007-11-03 16:05:26 UTC (rev 3494)
@@ -62,6 +62,9 @@
 Copyright 1984, 1987, 1989, 1995 by Stephen L. Moshier
 */
 
+#ifndef CEPHES_MCONF_H
+#define CEPHES_MCONF_H
+
 #include "cephes_names.h"
 
 /* Constant definitions for math error conditions
@@ -174,3 +177,5 @@
 extern int merror;
 
 #define gamma Gamma
+
+#endif /* CEPHES_MCONF_H */

Modified: trunk/scipy/special/cephes.h
===================================================================
--- trunk/scipy/special/cephes.h	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/cephes.h	2007-11-03 16:05:26 UTC (rev 3494)
@@ -7,6 +7,9 @@
  *   Created: Fri Mar 31 19:17:33 1995
  */
 
+#ifndef CEPHES_H
+#define CEPHES_H
+
 #include "cephes/cephes_names.h"
 
 extern int airy ( double x, double *ai, double *aip, double *bi, double *bip );
@@ -194,7 +197,4 @@
 extern double kolmogorov ( double x );
 extern double kolmogi ( double p );
 
-
-
-
-
+#endif /* CEPHES_H */

Modified: trunk/scipy/special/cephes_doc.h
===================================================================
--- trunk/scipy/special/cephes_doc.h	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/cephes_doc.h	2007-11-03 16:05:26 UTC (rev 3494)
@@ -1,3 +1,5 @@
+#ifndef CEPHES_DOC_H
+#define CEPHES_DOC_H
 #define airy_doc "(Ai,Aip,Bi,Bip)=airy(z) calculates the Airy functions and their derivatives\nevaluated at real or complex number z.  The Airy functions Ai and Bi \nare two independent solutions of y''(x)=xy.  Aip and Bip are the first derivatives\nevaluated at x of Ai and Bi respectively."
 #define airye_doc "(Aie,Aipe,Bie,Bipe)=airye(z) calculates the exponentially scaled Airy functions and \ntheir derivatives evaluated at real or complex number z.  \nairye(z)[0:1] = airy(z)[0:1] * exp(2.0/3.0*z*sqrt(z))\nairye(z)[2:3] = airy(z)[2:3] * exp(-abs((2.0/3.0*z*sqrt(z)).real))"
 #define bdtr_doc "y=bdtr(k,n,p) returns the sum of the terms 0 through k of the\nBinomial probability density:  sum(nCj p**j (1-p)**(n-j),j=0..k)"
@@ -96,12 +98,12 @@
 #define lpmv_doc "y=lpmv(m,v,x) returns the associated legendre function of integer order\nm and nonnegative degree v: |x|<=1."
 #define mathieu_a_doc "lmbda=mathieu_a(m,q) returns the characteristic value for the even solution, \nce_m(z,q), of Mathieu's equation"
 #define mathieu_b_doc "lmbda=mathieu_b(m,q) returns the characteristic value for the odd solution, \nse_m(z,q), of Mathieu's equation"
-#define mathieu_cem_doc "(y,yp)=mathieu_cem(m,q,x) returns the even Mathieu function, ce_m(x,q), \nof order m and parameter q evaluated at x (given in degrees).  Also returns the derivative\nwith respect to x of ce_m(x,q)"
-#define mathieu_modcem1_doc "(y,yp)=mathieu_modcem1(m,q,x) evaluates the even modified Matheiu function \nof the first  kind, Mc1m(x,q), and its derivative at x (given in degrees) for order m and\nparameter q"
-#define mathieu_modcem2_doc "(y,yp)=mathieu_modcem2(m,q,x) evaluates the even modified Matheiu function \nof the second kind, Mc2m(x,q), and its derivative at x (given in degrees) for order m and \nparameter q"
-#define mathieu_modsem1_doc "(y,yp)=mathieu_modsem1(m,q,x) evaluates the odd modified Matheiu function \nof the first kind, Ms1m(x,q), and its derivative at x (given in degrees) for order m and \nparameter q"
-#define mathieu_modsem2_doc "(y,yp)=mathieu_modsem2(m,q,x) evaluates the odd modified Matheiu function\nof the second kind, Ms2m(x,q), and its derivative at x (given in degrees) for order m and \nparameter q"
-#define mathieu_sem_doc "(y,yp)=mathieu_sem(m,q,x) returns the odd Mathieu function, se_m(x,q), \nof order m and parameter q evaluated at x (given in degrees).  Also returns the derivative\nwith respect to x (given in degrees) of se_m(x,q)"
+#define mathieu_cem_doc "(y,yp)=mathieu_cem(m,q,x) returns the even Mathieu function, ce_m(x,q), \nof order m and parameter q evaluated at x (given in degrees).\nAlso returns the derivative with respect to x of ce_m(x,q)"
+#define mathieu_modcem1_doc "(y,yp)=mathieu_modcem1(m,q,x) evaluates the even modified Matheiu function \nof the first kind, Mc1m(x,q), and its derivative at x for order m and\nparameter q."
+#define mathieu_modcem2_doc "(y,yp)=mathieu_modcem2(m,q,x) evaluates the even modified Matheiu function \nof the second kind, Mc2m(x,q), and its derivative at x (given in degrees)\nfor order m and parameter q."
+#define mathieu_modsem1_doc "(y,yp)=mathieu_modsem1(m,q,x) evaluates the odd modified Matheiu function \nof the first kind, Ms1m(x,q), and its derivative at x (given in degrees)\nfor order m and parameter q."
+#define mathieu_modsem2_doc "(y,yp)=mathieu_modsem2(m,q,x) evaluates the odd modified Matheiu function\nof the second kind, Ms2m(x,q), and its derivative at x (given in degrees)\nfor order m and parameter q."
+#define mathieu_sem_doc "(y,yp)=mathieu_sem(m,q,x) returns the odd Mathieu function, se_m(x,q), \nof order m and parameter q evaluated at x (given in degrees).\nAlso returns the derivative with respect to x of se_m(x,q)."
 #define modfresnelm_doc "(fm,km)=modfresnelp(x) returns the modified fresnel integrals F_-(x) amd K_-(x)\nas fp=integral(exp(-1j*t*t),t=x..inf) and kp=1/sqrt(pi)*exp(1j*(x*x+pi/4))*fp"
 #define modfresnelp_doc "(fp,kp)=modfresnelp(x) returns the modified fresnel integrals F_+(x) and K_+(x)\nas fp=integral(exp(1j*t*t),t=x..inf) and kp=1/sqrt(pi)*exp(-1j*(x*x+pi/4))*fp"
 #define modstruve_doc "y=modstruve(v,x) returns the modified Struve function Lv(x) of order\nv at x, x must be positive unless v is an integer and it is recommended\nthat |v|<=20."
@@ -156,3 +158,4 @@
 #define yve_doc "y=yve(v,z) returns the exponentially scaled Bessel function of the second \nkind of real order v at complex z: yve(v,z) = yv(v,z) * exp(-abs(z.imag))"
 #define zeta_doc "y=zeta(x,q) returns the Riemann zeta function of two arguments:\nsum((k+q)**(-x),k=0..inf)"
 #define zetac_doc "y=zetac(x) returns 1.0 - the Riemann zeta function: sum(k**(-x), k=2..inf)"
+#endif /* CEPHES_DOC_H */

Modified: trunk/scipy/special/docs/included_functions.html
===================================================================
--- trunk/scipy/special/docs/included_functions.html	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/docs/included_functions.html	2007-11-03 16:05:26 UTC (rev 3494)
@@ -13,8 +13,8 @@
 <DT>(Aie,Aipe,Bie,Bipe) = airye(z)
 <DD>airye(z) calculates the exponentially scaled Airy functions and 
 their derivatives evaluated at real or complex number z.  
-airye(z)[0:2] = airy(z)[0:2] * exp(2.0/3.0*z*sqrt(z))
-airye(z)[2:4] = airy(z)[2:4] * exp(-abs(real((2.0/3.0*z*sqrt(z)))))
+airye(z)[0:1] = airy(z)[0:1] * exp(2.0/3.0*z*sqrt(z))
+airye(z)[2:3] = airy(z)[2:3] * exp(-abs((2.0/3.0*z*sqrt(z)).real))
 </DL>
 
 <DT>(Apt,Bpt,Ant,Bnt) = itairy(x)
@@ -467,33 +467,33 @@
 
 <DT>(y,yp) = mathieu_cem(m,q,x)
 <DD>mathieu_cem(m,q,x) returns the even Mathieu function, ce_m(x,q), 
-of order m and parameter q evaluated at x.  Also returns the derivative
-with respect to x of ce_m(x,q)
+of order m and parameter q evaluated at x (given in degrees).
+Also returns the derivative with respect to x of ce_m(x,q)
 
 <DT>(y,yp) = mathieu_sem(m,q,x)
 <DD>mathieu_sem(m,q,x) returns the odd Mathieu function, se_m(x,q), 
-of order m and parameter q evaluated at x.  Also returns the derivative
-with respect to x of se_m(x,q)
+of order m and parameter q evaluated at x (given in degrees).
+Also returns the derivative with respect to x of se_m(x,q).
 
 <DT>(y,yp) = mathieu_modcem1(m,q,x)
 <DD>mathieu_modcem1(m,q,x) evaluates the even modified Matheiu function 
-of the first  kind, Mc1m(x,q), and its derivative at x for order m and
-parameter q
+of the first kind, Mc1m(x,q), and its derivative at x for order m and
+parameter q.
 
 <DT>(y,yp) = mathieu_modcem2(m,q,x)
 <DD>mathieu_modcem2(m,q,x) evaluates the even modified Matheiu function 
-of the second kind, Mc2m(x,q), and its derivative at x for order m and 
-parameter q
+of the second kind, Mc2m(x,q), and its derivative at x (given in degrees)
+for order m and parameter q.
 
 <DT>(y,yp) = mathieu_modsem1(m,q,x)
 <DD>mathieu_modsem1(m,q,x) evaluates the odd modified Matheiu function 
-of the first kind, Ms1m(x,q), and its derivative at x for order m and 
-parameter q
+of the first kind, Ms1m(x,q), and its derivative at x (given in degrees)
+for order m and parameter q.
 
 <DT>(y,yp) = mathieu_modsem2(m,q,x)
 <DD>mathieu_modsem2(m,q,x) evaluates the odd modified Matheiu function
-of the second kind, Ms2m(x,q), and its derivative at x for order m and 
-parameter q
+of the second kind, Ms2m(x,q), and its derivative at x (given in degrees)
+for order m and parameter q.
 
 
 <h1> Spheroidal Wave Functions </h1>

Modified: trunk/scipy/special/gendoc.py
===================================================================
--- trunk/scipy/special/gendoc.py	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/gendoc.py	2007-11-03 16:05:26 UTC (rev 3494)
@@ -36,6 +36,9 @@
     keys = d.keys()
     keys.sort()
     ofile=open("cephes_doc.h",'w')
+    ofile.write('#ifndef CEPHES_DOC_H\n')
+    ofile.write('#define CEPHES_DOC_H\n')
     for key in keys:
         ofile.write('#define %s_doc "%s"\n'%(key,repr(d[key])[1:-1]))
+    ofile.write('#endif /* CEPHES_DOC_H */\n')
     ofile.close()

Modified: trunk/scipy/special/setup.py
===================================================================
--- trunk/scipy/special/setup.py	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/setup.py	2007-11-03 16:05:26 UTC (rev 3494)
@@ -35,6 +35,11 @@
     config.add_extension('_cephes', sources=sources,
                          libraries=['amos','toms','c_misc','cephes','mach',
                                     'cdf', 'specfun'],
+                         depends=["ufunc_extras.h", "cephes.h",
+                                  "amos_wrappers.h", "toms_wrappers.h",
+                                  "cdf_wrappers.h", "specfun_wrappers.h",
+                                  "c_misc/misc.h", "cephes_doc.h",
+                                  "cephes/mconf.h", "cephes/cephes_names.h"],
                          define_macros = define_macros
                          )
     # Extension specfun

Modified: trunk/scipy/special/ufunc_extras.h
===================================================================
--- trunk/scipy/special/ufunc_extras.h	2007-11-02 23:33:49 UTC (rev 3493)
+++ trunk/scipy/special/ufunc_extras.h	2007-11-03 16:05:26 UTC (rev 3494)
@@ -1,3 +1,6 @@
+#ifndef UFUNC_EXTRAS_H
+#define UFUNC_EXTRAS_H
+
 #include "Python.h"
 #include "numpy/noprefix.h"
 
@@ -76,4 +79,4 @@
 extern void PyUFunc_ffff_ff_As_dddi_dd(char **args, intp *dimensions, intp *steps, void *func);
 extern void PyUFunc_dddd_dd_As_dddi_dd(char **args, intp *dimensions, intp *steps, void *func);
 
-
+#endif /* UFUNC_EXTRAS_H */



More information about the Scipy-svn mailing list