astrofrog / fast-histogram

:zap: Fast 1D and 2D histogram functions in Python :zap:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: invalid memory access

manodeep opened this issue · comments

The condition in _histogram1d, line 109 should probably be tx < xmax, otherwise there will be invalid memory access for tx==xmax (that would result in ix==nx). Similarly for _histogram2d, line 201

Good catch! I had fixed this for the 2D case but forgot about the 1D case.