Fix conversion error when input was an int

This commit is contained in:
Dev 2024-04-22 21:21:03 +01:00
parent f7d8f829d4
commit 949a066519

View File

@ -85,7 +85,8 @@ public static class LooseLootProcessor
// we want to cleanup the data, so we calculate the mean for the values we get raw // we want to cleanup the data, so we calculate the mean for the values we get raw
// For whatever reason, we sometimes get dumps that have A LOT more loose loot point than // For whatever reason, we sometimes get dumps that have A LOT more loose loot point than
// the average // the average
var initialMean = np.mean(np.array(looseLootCounts.MapSpawnpointCount)).ToArray<double>().First(); var values = looseLootCounts.MapSpawnpointCount.Select(Convert.ToDouble);
var initialMean = np.mean(np.array(values)).ToArray<double>().First();
var looseLootCountTolerancePercentage = LootDumpProcessorContext.GetConfig().ProcessorConfig.LooseLootCountTolerancePercentage / 100; var looseLootCountTolerancePercentage = LootDumpProcessorContext.GetConfig().ProcessorConfig.LooseLootCountTolerancePercentage / 100;
// We calculate here a high point to check, anything above this value will be ignored // We calculate here a high point to check, anything above this value will be ignored
// The data that was inside those loose loot points still counts for them though! // The data that was inside those loose loot points still counts for them though!