Arviz plot_energy doesn't like PyMC custom step method?

Which version are you on? I am on pymc 5.10.0 and the only error I get is step related and I assume this is because you set the step for sigma twice. Once I change it to

stepmethod = pm.NUTS([model1["sigma"],model1["slope"],model1["intercept"]])
samples1=sample(1000,step=stepmethod)

or let pymc choose the steps, it runs fine:



slope and intercept is correlated probably because data is not standardised