Skip to content

Commit 8cbc5da

Browse files
committed
DOC: Fix inline math syntax in docstrings
Fix inline math syntax in docstrings: use the `math:` role instead of using the MathJax native `$`. https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-math
1 parent e848774 commit 8cbc5da

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/nifreeze/analysis/filtering.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def normalize(x: np.ndarray):
3434
3535
z_i = \frac{x_i - \mu}{\sigma}
3636
37-
where $x_i$ is the framewise displacement at point $i$, $\mu$ is the mean
38-
of all values, $\sigma$ is the standard deviation of the values, and $z_i$
39-
is the normalized z-score.
37+
where :math:`x_i` is the framewise displacement at point :math:`i`,
38+
:math:`\mu` is the mean of all values, :math:`\sigma` is the standard
39+
deviation of the values, and :math:`z_i` is the normalized z-score.
4040
4141
Parameters
4242
----------

src/nifreeze/model/gqi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def prediction_kernel(gtab, param_lambda, sphere, method="standard"):
206206
207207
S(\theta, b) = K_{ii}^{-1} \cdot ODF
208208
209-
where $K_{ii}^{-1}$, is the inverse of the GQI kernels for the direction(s) $ii$
210-
given by ``gtab``.
209+
where :math:`K_{ii}^{-1}`, is the inverse of the GQI kernels for the
210+
direction(s) :math:`ii` given by ``gtab``.
211211
212212
"""
213213
# K.shape = (n_gradients, n_vertices)

src/nifreeze/testing/simulations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ def create_random_polar_angles(size, rng):
227227

228228

229229
def create_random_diffusivity_eigenvalues(size, rng):
230-
r"""Create DTI model diffusion tensor eigenvalues ($\lambda_{1},
231-
\lambda_{2}, \lambda_{3}$) drawn from a uniform distribution."""
230+
r"""Create DTI model diffusion tensor eigenvalues (:math:`\lambda_{1}, \lambda_{2}, \lambda_{3}`)
231+
drawn from a uniform distribution."""
232232

233233
# lambda_2 = lambda_3 following Canales-Rodriguez, NIMG 184 2019,
234234
# https://doi.org/10.1016/j.neuroimage.2018.08.071

0 commit comments

Comments
 (0)