Download node_modules/d3-array/src/threshold/sturges.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 160 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/threshold/sturges.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-array/src/threshold/sturges.js
-
curl -L -o sturges.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/threshold/sturges.js
160 Bytes
| import count from "../count.js"; | |
| export default function thresholdSturges(values) { | |
| return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1); | |
| } | |