Currently various sampling iterators in the code return tuples
yield (idx, ustar, vstar, loglstar, logvol, logwt, logz, logzvar, h, 1, point_it, boundidx, bounditer, self.eff, delta_logz)
which are then unpacked
(worst, ustar, vstar, loglstar, logvol, logwt, logz, logzvar, h, nc, worst_it, boundidx, bounditer, eff, delta_logz) = results
which is error-prone and pollutes the namespace with unused/confusing variables.
I think we need to do yield namedtuples and extract from them just what we need.
In [7]: NT=collections.namedtuple('R',['worst','ustar'])
In [8]: x=NT(worst=33,ustar=[3,5])
In [9]: x.worst
Out[9]: 33
In [10]: x.ustar
Out[10]: [3, 5]
Currently various sampling iterators in the code return tuples
yield (idx, ustar, vstar, loglstar, logvol, logwt, logz, logzvar, h, 1, point_it, boundidx, bounditer, self.eff, delta_logz)
which are then unpacked(worst, ustar, vstar, loglstar, logvol, logwt, logz, logzvar, h, nc, worst_it, boundidx, bounditer, eff, delta_logz) = results
which is error-prone and pollutes the namespace with unused/confusing variables.I think we need to do yield namedtuples and extract from them just what we need.