From dd908c9f90d51e713917a15c46685aa8032e2b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Agas=C3=B8ster=20Haaga?= Date: Fri, 2 Aug 2024 03:03:22 +0200 Subject: [PATCH] Fix tests --- .../correlation/azadkia_chatterjee_coefficient.jl.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/methods/correlation/azadkia_chatterjee_coefficient.jl.jl b/src/methods/correlation/azadkia_chatterjee_coefficient.jl.jl index 5d94d92d..8cdc7ec1 100644 --- a/src/methods/correlation/azadkia_chatterjee_coefficient.jl.jl +++ b/src/methods/correlation/azadkia_chatterjee_coefficient.jl.jl @@ -87,25 +87,26 @@ function AzadkiaChatterjeeCoefficient(inputs...; theiler::Integer = 0) @assert 2 ≤ length(inputs) ≤ 3 ns = length.(inputs) @assert allequal(ns) + m = length(inputs) n = length(first(inputs)) sorted_ys = sort(first(inputs)) r = zeros(Int, n) - if n == 3 + if m == 2 r = zeros(Int, n) Mᵢs = zeros(Int, n) Nᵢs = nothing RMᵢs = zeros(Int, n) RNᵢs = nothing - 𝓁 = nothing - else # n == 2 + 𝓁 = zeros(Int, n) + else # m == 3 r = zeros(Int, n) Mᵢs = zeros(Int, n) Nᵢs = zeros(Int, n) RMᵢs = zeros(Int, n) RNᵢs = zeros(Int, n) - 𝓁 = zeros(Int, n) + 𝓁 = nothing end return AzadkiaChatterjeeCoefficient(sorted_ys, 𝓁, r, Mᵢs, Nᵢs, RMᵢs, RNᵢs, theiler)