[–] thomasahle 5y ago ↗ Original title: Why you can't Sample from a Dictionary in Python.Naively it should be easy to do with rejection sampling, but there are some interesting details to as explained by Raymond Hettinger, the author of Python's dict.
1 comment
[ 5.8 ms ] story [ 15.0 ms ] threadNaively it should be easy to do with rejection sampling, but there are some interesting details to as explained by Raymond Hettinger, the author of Python's dict.