I've also got a small CLI on PyPI to do the same: https://pypi.python.org/pypi/callisto
Osvaldo Martin has ported (most of?) the book to PyMC3: https://github.com/aloctavodia/Statistical-Rethinking-with-P...
As you point out though, it depends on where the function is coming from: $ python -mtimeit -s'nums=range(10)' '[str(i) for i in nums]' 100000 loops, best of 3: 2.57 usec per loop $ python -mtimeit -s'nums=range(10)'…
I've also got a small CLI on PyPI to do the same: https://pypi.python.org/pypi/callisto
Osvaldo Martin has ported (most of?) the book to PyMC3: https://github.com/aloctavodia/Statistical-Rethinking-with-P...
As you point out though, it depends on where the function is coming from: $ python -mtimeit -s'nums=range(10)' '[str(i) for i in nums]' 100000 loops, best of 3: 2.57 usec per loop $ python -mtimeit -s'nums=range(10)'…