Skip to content

Commit a35c0bc

Browse files
committed
Manually fix some pyupgrade changes
1 parent 5fdc2f4 commit a35c0bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pymc3/distributions/simulator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(
3232
epsilon=1,
3333
**kwargs,
3434
):
35-
"""
35+
r"""
3636
This class stores a function defined by the user in Python language.
3737
3838
function: function
@@ -43,9 +43,9 @@ def __init__(
4343
Distance functions. Available options are "gaussian_kernel" (default), "wasserstein",
4444
"energy" or a user defined function that takes epsilon (a scalar), and the summary
4545
statistics of observed_data, and simulated_data as input.
46-
``gaussian_kernel`` :math: `\\sum \\left(-0.5 \\left(\frac{xo - xs}{\\epsilon}\right)^2\right)`
47-
``wasserstein`` :math: `\frac{1}{n} \\sum{\\left(\frac{|xo - xs|}{\\epsilon}\right)}`
48-
``energy`` :math: `\\sqrt{2} \\sqrt{\frac{1}{n} \\sum \\left(\frac{|xo - xs|}{\\epsilon}\right)^2}`
46+
``gaussian_kernel`` :math: `\sum \left(-0.5 \left(\frac{xo - xs}{\epsilon}\right)^2\right)`
47+
``wasserstein`` :math: `\frac{1}{n} \sum{\left(\frac{|xo - xs|}{\epsilon}\right)}`
48+
``energy`` :math: `\sqrt{2} \sqrt{\frac{1}{n} \sum \left(\frac{|xo - xs|}{\epsilon}\right)^2}`
4949
For the wasserstein and energy distances the observed data xo and simulated data xs
5050
are internally sorted (i.e. the sum_stat is "sort").
5151
sum_stat: str or callable

pymc3/step_methods/hmc/quadpotential.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def update(self, sample, grad, tune):
584584

585585
def raise_ok(self, vmap):
586586
if self._chol_error is not None:
587-
raise ValueError(f"{self._chol_error}")
587+
raise ValueError(str(self._chol_error))
588588

589589

590590
class _WeightedCovariance:

0 commit comments

Comments
 (0)