explosion / preshed

💥 Cython hash tables that assume keys are pre-hashed
MIT License
82 stars 19 forks source link

bugfix: counter.iter with map_get #19

Closed svlandeg closed 5 years ago

svlandeg commented 5 years ago

Looking into spaCy issue https://github.com/explosion/spaCy/issues/3869, I found that the counter.c_map.cells sometimes behave inconsistently, not reflecting the actual underlying state of the counter. Changing the __iter__ function to map_iter instead, fixed the issue.