Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
scheidan committed Apr 29, 2024
1 parent e411a26 commit 9cb6903
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Clustering = "^0.14.1"
Clustering = "^0.14.1, 0.15"
Combinatorics = "^1.0.2"
DataFrames = "^1.0"
DataStructures = "^0.17.19, 0.18"
Distributions = "^0.23.4, 0.24, 0.25"
DocStringExtensions = "^0.8.2"
DocStringExtensions = "^0.8.2, 0.9"
JSON3 = "^1.0.3"
NamedArrays = "^0.9.4"
NamedArrays = "^0.10"
ProgressMeter = "^1.3.3"
QuadGK = "^2.4.0"
Reexport = "^0.2.0, 1.0"
StatsBase = "^0.33.0"
StatsBase = "^0.33.0, 0.34"
StructTypes = "^1.1.0"
julia = "^1.4"
6 changes: 5 additions & 1 deletion src/selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ end
# Compute Kmeans clusters (Euclidian distance is used)
function getClusters(sysProperties::AbstractArray, ncluster::Int)
for i in 1:size(sysProperties,2)
sysProperties[:,i] = (sysProperties[:,i] .- mean(sysProperties[:,i])) ./ std(Float64.(sysProperties[:,i]))
Z = std(Float64.(sysProperties[:,i]))
sysProperties[:,i] .= sysProperties[:,i] .- mean(sysProperties[:,i])
if Z > 0
sysProperties[:,i] .= sysProperties[:,i] ./ Z
end
end
km = kmeans(Float64.(sysProperties)', ncluster)
return km
Expand Down
2 changes: 1 addition & 1 deletion test/user_interface_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ input_masses = Dict("Dry.toilet" => Dict("phosphor" => 548.0,
)

# calculate mass flows for all systems and write to system properties
massflow_summary!.(allSys, Ref(input_masses), n=20)
massflow_summary!.(allSys, Ref(input_masses), n=10)
@test "massflow_stats" in keys(allSys[1].properties)
@test length(keys(allSys[1].properties["massflow_stats"])) == 5

Expand Down

0 comments on commit 9cb6903

Please sign in to comment.