UnboundLocalError in mcmc_anneal
I was testing gt.mcmc_anneal functionality (with dumb parameters) and I stepped into this error:
UnboundLocalError Traceback (most recent call last)
<ipython-input-60-f1caf6006ae1> in <module>
----> 1 gt.mcmc_anneal(state, mcmc_equilibrate_args=dict(epsilon=1e-3, multiflip=True, mcmc_args=dict(niter=10)), niter=2, beta_range=(1, np.inf))
~/anaconda3/envs/scrna/lib/python3.7/site-packages/graph_tool/inference/mcmc.py in mcmc_anneal(state, beta_range, niter, history, mcmc_equilibrate_args, verbose)
264 else:
265 S = ret[0]
--> 266 attempts += ret[1]
267 nmoves += ret[2]
268
UnboundLocalError: local variable 'attempts' referenced before assignment
Is this due to a typo? I'm asking as in the rest of the function code there's a nattempts
variable which is never touched (and yet returned)