diff --git a/pymc/step_methods/hmc/base_hmc.py b/pymc/step_methods/hmc/base_hmc.py index 7bc0e98a0b..1f45856ab9 100644 --- a/pymc/step_methods/hmc/base_hmc.py +++ b/pymc/step_methods/hmc/base_hmc.py @@ -60,7 +60,7 @@ def __init__( t0=10, adapt_step_size=True, step_rand=None, - **aesara_kwargs + **aesara_kwargs, ): """Set up Hamiltonian samplers with common structures. @@ -165,7 +165,7 @@ def astep(self, q0): self.potential.raise_ok(q0.point_map_info) message_energy = ( "Bad initial energy, check any log probabilities that " - "are inf or -inf, nan or very small:\n{}".format(error_logp.to_string()) + f"are inf or -inf, nan or very small:\n{error_logp}" ) warning = SamplerWarning( WarningType.BAD_ENERGY,