We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
napari_matplotlib.histogram._get_bins
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
napari_matplotlib.histogram._get_bins returns fewer bins if the data passed to it are float compared to if they are int.
float
int
To reproduce:
import numpy as np from napari_matplotlib.histogram import _get_bins data = np.arange(0, 101, dtype=int) print(_get_bins(data).size) print(_get_bins(data.astype(float)).size)
which prints:
101 100
To fix, perhaps 100 bins (101 bin edges) should be created with np.linspace for float data
np.linspace
The text was updated successfully, but these errors were encountered:
HistogramWidget
Successfully merging a pull request may close this issue.
napari_matplotlib.histogram._get_bins
returns fewer bins if the data passed to it arefloat
compared to if they areint
.To reproduce:
which prints:
To fix, perhaps 100 bins (101 bin edges) should be created with
np.linspace
for float dataThe text was updated successfully, but these errors were encountered: