diff options
author | guoci <zguoci@gmail.com> | 2018-03-10 14:27:36 -0500 |
---|---|---|
committer | guoci <zguoci@gmail.com> | 2018-03-10 14:27:36 -0500 |
commit | 7bcea9f884cac1708bac5aa48c86e26a247fab4e (patch) | |
tree | bff6f0cf5247562f6c46741aee0af7f43edb294c /numpy/doc/constants.py | |
parent | c486d8d0d496f6b366dc827a3d41ed1e9d593ec8 (diff) | |
download | numpy-7bcea9f884cac1708bac5aa48c86e26a247fab4e.tar.gz |
add documentation for constants
Diffstat (limited to 'numpy/doc/constants.py')
-rw-r--r-- | numpy/doc/constants.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py index 6246813b7..c4db4c96a 100644 --- a/numpy/doc/constants.py +++ b/numpy/doc/constants.py @@ -3,6 +3,8 @@ Constants ========= +.. currentmodule:: numpy + NumPy includes several constants: %(constant_list)s @@ -225,7 +227,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 +365,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 +405,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) |