From 334aca1c65a20f5a75e2233728d60ce87a8b7030 Mon Sep 17 00:00:00 2001 From: salbalkus Date: Wed, 7 Aug 2024 18:48:38 -0400 Subject: [PATCH] slight efficiency improvement of AllOrderStatistics --- src/network_summary.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network_summary.jl b/src/network_summary.jl index 16aae31..7ad612e 100644 --- a/src/network_summary.jl +++ b/src/network_summary.jl @@ -49,7 +49,7 @@ summarize(o::NamedTuple, x::AllOrderStatistics) = order_statistic_matrix(o[x.tar function order_statistic_matrix(X::AbstractArray, G::SparseMatrixCSC) n = length(X) - max_k = Int(maximum(G * ones(n))) + max_k = Int(maximum(sum(G, dims = 2))) Xvec = map(x -> Missings.missings(Float64, max_k), 1:n) r = rowvals(G)