astrofrog / astrofrog/fast-histogram

different result compared to numpy

Open
#61 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
281
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Hello there,

I am trying to use this repo to replace numpy but get different result.

I put range as the minimum of the input and the maximum of the input. But I found out that the result is missing some maximum value.

For example,

`test_case = np.array([1, 1, 2, 2, 3, 3, 10, 10])
freq, bins = np.histogram(test_case, range(np.min(test_case), np.max(test_case + 1)))
result = histogram1d(test_case, bins=9, range=(np.min(test_case), np.max(test_case)))`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported example with the shown test_case and compare histogram1d against numpy.histogram using the stated range and nine bins. Trace how the maximum boundary is handled and confirm the corrected result includes the expected maximum values.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, numpy, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.