Skip to content

Commit 3b63ade

Browse files
DOC: Tweak markup in a few docstrings.
1 parent f457636 commit 3b63ade

File tree

5 files changed

+28
-27
lines changed

5 files changed

+28
-27
lines changed

mpsci/fun/_debye.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ def debye(x, *, n, method='quad'):
66
"""
77
Compute the Debye function D_n(x).
88
9-
If `method == 'quad'`, `mp.quad` is used to evaluate the integral form
10-
of the function, so it might be necessary to set mp.dps to a value
11-
much larger than the desired output precision. For example, mp.dps=150
9+
If ``method == 'quad'``, ``mp.quad`` is used to evaluate the integral form
10+
of the function, so it might be necessary to set ``mp.dps`` to a value
11+
much larger than the desired output precision. For example, ``mp.dps = 150``
1212
is required to get an accurate double precision result from
13-
mp_debye1(1e100, 1).
13+
``mp_debye1(1e100, 1)``.
1414
15-
If `method == 'nsum'`, `mp.nsum` is used to evalute the series form
15+
If ``method == 'nsum'``, ``mp.nsum`` is used to evalute the series form
1616
of the function.
1717
"""
1818
try:

mpsci/fun/_digammainv.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ def digammainv(y):
1111
The `digamma function` [1]_ [2]_ is the logarithmic derivative of the
1212
gamma function.
1313
14-
For real y, digammainv(y) returns the positive x such that digamma(x) = y.
14+
For real ``y``, ``digammainv(y)`` returns the positive ``x`` such that
15+
``digamma(x) = y``.
1516
16-
The digamma function is also known as psi_0; `mpmath.digamma(x)` is the
17-
same as `mpmath.psi(0, x)`.
17+
The digamma function is also known as psi_0; ``mpmath.digamma(x)`` is the
18+
same as ``mpmath.psi(0, x)``.
1819
1920
References
2021
----------

mpsci/fun/_inv_reg_inc_beta.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,29 @@ def betaincinv(a, b, y, method='findroot', complement=False):
3131
"""
3232
Inverse of the regularized incomplete beta function.
3333
34-
If `complement` is True, the inverse of the complement of the
34+
If ``complement`` is True, the inverse of the complement of the
3535
regularized incomplete beta function is computed.
3636
3737
The function name and first three parameters match those of
38-
`scipy.special.betaincinv`. With `complement=True`, the function
39-
computes the equivalent of `scipy.special.betainccinv`.
38+
``scipy.special.betaincinv``. With ``complement=True``, the function
39+
computes the equivalent of ``scipy.special.betainccinv``.
4040
41-
The `method` parameter has several options:
41+
The ``method`` parameter has several options:
4242
43-
* `"findroot"`:
44-
Use `mpmath.mp.findroot`, with initial guess 0.5.
45-
* `("findroot", x0)`:
46-
Use `mpmath.mp.findroot`, with initial guess `x0`.
47-
* `"bisect"`:
43+
* ``"findroot"``:
44+
Use ``mpmath.mp.findroot``, with initial guess 0.5.
45+
* ``("findroot", x0)``:
46+
Use ``mpmath.mp.findroot``, with initial guess ``x0``.
47+
* ``"bisect"``:
4848
Use a bisection method, starting with the root bracket
4949
[0, 1].
50-
* `("bisect", [xa, xb])`:
50+
* ``("bisect", [xa, xb])``:
5151
Use a bisection method; start the bisection with the
52-
bracket `[xa, xb]`. `xa` and `xb` must be chosen so that
53-
the inverse is in the interval `[xa, xb]`.
52+
bracket ``[xa, xb]``. ``xa`` and ``xb`` must be chosen so that
53+
the inverse is in the interval ``[xa, xb]``.
5454
5555
The numerical method that is used to find the root (either
56-
`mpmath.mp.findroot` or the bisection method) might fail for some
56+
``mpmath.mp.findroot`` or the bisection method) might fail for some
5757
inputs. If that happens, try changing the method, or try changing
5858
the initial guess or initial bracket.
5959

mpsci/fun/_wright_bessel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def wright_bessel(z, rho, beta):
2222
2323
but here the `z` parameter is given first.
2424
25-
z and beta can be complex.
26-
rho must be real and greater than -1.
25+
``z`` and ``beta`` can be complex.
26+
``rho`` must be real and greater than -1.
2727
28-
*Warning*: In the general case, this function uses `mpmath.mp.nsum`
28+
*Warning*: In the general case, this function uses ``mpmath.mp.nsum``
2929
to compute the approximate sum of the Wright-Bessel series. This
3030
might require setting the mpmath precision very high to ensure that
3131
the result is accurate.

mpsci/fun/_xlogy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ def xlog1py(x, y):
3030
"""
3131
x*log(1+y)
3232
33-
If x is 0 and y is not nan, 0 is returned.
33+
If ``x`` is 0 and ``y`` is not ``nan``, 0 is returned.
3434
35-
This function is mathematically equivalent to `mpsci.fun.xlogy(1 + y)`.
36-
It avoids the loss of precision that can result if y is very small.
35+
This function is mathematically equivalent to ``mpsci.fun.xlogy(1 + y)``.
36+
It avoids the loss of precision that can result if ``y`` is very small.
3737
3838
*See also:* :func:`xlogy`
3939
"""

0 commit comments

Comments
 (0)