Skip to content
New issue

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

d3.thresholdScott returns NaN for single-element arrays #270

Closed
mbostock opened this issue Mar 17, 2023 · 0 comments · Fixed by #271
Closed

d3.thresholdScott returns NaN for single-element arrays #270

mbostock opened this issue Mar 17, 2023 · 0 comments · Fixed by #271

Comments

@mbostock
Copy link
Member

E.g.,

d3.thresholdScott([1], 0, 1)

It should probably return 1 in this case instead (which matches d3.thresholdSturges).

Also… this returns infinity, which should probably also be fixed.

d3.thresholdFreedmanDiaconis([1], 0, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant