From 445700f747c837ee6ac3c2847c558dd16f079e2b Mon Sep 17 00:00:00 2001 From: Philip Swannell <18028484+PGS62@users.noreply.github.com> Date: Wed, 22 Feb 2023 14:36:08 +0000 Subject: [PATCH] re-ordered methods --- src/corkendall.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corkendall.jl b/src/corkendall.jl index 7f2b996..ad59497 100644 --- a/src/corkendall.jl +++ b/src/corkendall.jl @@ -330,6 +330,8 @@ end Return a pair `(a,b)`, filtered copies of `x` and `y`, in which elements `x[i]` and `y[i]` are filtered out if `ismissing(x[i])||ismissing(y[i])`. """ +handlepairwise(x::AbstractVector{<:Real}, y::AbstractVector{<:Real}) = x, y + function handlepairwise(x::RoMVector{T}, y::RoMVector{U}) where {T,U} n = length(x) @@ -348,8 +350,6 @@ function handlepairwise(x::RoMVector{T}, y::RoMVector{U}) where {T,U} return resize!(a, j), resize!(b, j) end -handlepairwise(x::AbstractVector{<:Real}, y::AbstractVector{<:Real}) = x, y - """ handlepairwise!(x::RoMVector{T}, y::RoMVector{U}, tx::AbstractVector{T}, ty::AbstractVector{U}) where {T,U} @@ -410,6 +410,8 @@ end Return a pair `(a,b)`, filtered copies of `(x,y)`, in which the rows `x[i,:]` and `y[i,:]` are both filtered out if `any(ismissing,x[i,:])||any(ismissing,y[i,:])`. """ +handlelistwise(x::AbstractMatrix{<:Real}, y::AbstractMatrix{<:Real}) = x, y + function handlelistwise(x::RoMMatrix{T}, y::RoMMatrix{U}) where {T,U} nrx = size(x, 1) @@ -449,4 +451,3 @@ function handlelistwise(x::RoMMatrix{T}, y::RoMMatrix{U}) where {T,U} return view(a, 1:k, :), view(b, 1:k, :) end -handlelistwise(x::AbstractMatrix{<:Real}, y::AbstractMatrix{<:Real}) = x, y \ No newline at end of file