summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/doc/constants.py27
-rw-r--r--numpy/f2py/src/test/foomodule.c4
2 files changed, 27 insertions, 4 deletions
diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py
index 6246813b7..f3b835085 100644
--- a/numpy/doc/constants.py
+++ b/numpy/doc/constants.py
@@ -1,8 +1,11 @@
+# -*- coding: utf-8 -*-
"""
=========
Constants
=========
+.. currentmodule:: numpy
+
NumPy includes several constants:
%(constant_list)s
@@ -225,7 +228,7 @@ add_newdoc('numpy', 'e',
References
----------
- .. [1] http://en.wikipedia.org/wiki/Napier_constant
+ https://en.wikipedia.org/wiki/E_%28mathematical_constant%29
""")
@@ -363,6 +366,26 @@ add_newdoc('numpy', 'newaxis',
""")
+add_newdoc('numpy', 'pi',
+ """
+ ``pi = 3.1415926535897932384626433...``
+
+ References
+ ----------
+ https://en.wikipedia.org/wiki/Pi
+
+ """)
+
+add_newdoc('numpy', 'euler_gamma',
+ """
+ ``γ = 0.5772156649015328606065120900824024310421...``
+
+ References
+ ----------
+ https://en.wikipedia.org/wiki/Euler-Mascheroni_constant
+
+ """)
+
if __doc__:
constants_str = []
constants.sort()
@@ -383,7 +406,7 @@ if __doc__:
s = "\n".join(new_lines)
# Done.
- constants_str.append(""".. const:: %s\n %s""" % (name, s))
+ constants_str.append(""".. data:: %s\n %s""" % (name, s))
constants_str = "\n".join(constants_str)
__doc__ = __doc__ % dict(constant_list=constants_str)
diff --git a/numpy/f2py/src/test/foomodule.c b/numpy/f2py/src/test/foomodule.c
index 10f02f42b..d7ecc2519 100644
--- a/numpy/f2py/src/test/foomodule.c
+++ b/numpy/f2py/src/test/foomodule.c
@@ -5,7 +5,7 @@
* $Revision: 1.2 $
* $Date: 2000/09/17 16:10:27 $
*/
-#ifdef __CPLUSPLUS__
+#ifdef __cplusplus
extern "C" {
#endif
@@ -139,6 +139,6 @@ void initfoo() {
Py_FatalError("can't initialize module foo");
}
-#ifdef __CPLUSCPLUS__
+#ifdef __cplusplus
}
#endif