fix variable

This commit is contained in:
Christoph Kluge 2023-08-31 15:19:54 +02:00
parent cffdd055c9
commit a2a4b2e6c2

View File

@ -352,7 +352,7 @@ export function binsFromFootprint(weights, scope, values, numBins) {
const rawBins = new Array(numBins).fill(0) const rawBins = new Array(numBins).fill(0)
for (let i = 0; i < values.length; i++) for (let i = 0; i < values.length; i++)
bins[Math.floor(((values[i] - min) / (max - min)) * numBins)] += scopeWeights ? scopeWeights[i] : 1 rawBins[Math.floor(((values[i] - min) / (max - min)) * numBins)] += scopeWeights ? scopeWeights[i] : 1
const bins = rawBins.map((count, idx) => ({ const bins = rawBins.map((count, idx) => ({
value: Math.floor(min + ((idx + 1) / numBins) * (max - min)), value: Math.floor(min + ((idx + 1) / numBins) * (max - min)),