JuliaStats / HypothesisTests.jl

Hypothesis tests for Julia
Other
292 stars 87 forks source link

Broadening input types for `ApproximatePermutationTest` #314

Open marcpabst opened 5 months ago

marcpabst commented 5 months ago

I was poking around the ApproximatePermutationTest function and this is the current signature:

function ApproximatePermutationTest(rng::AbstractRNG, x::AbstractVector{R}, y::AbstractVector{S},
                                    f::Function, n::Int) where {R<:Real,S<:Real}

I'm curious about the decision to restrict the input types for x and y to AbstractVector{<:Real}. It seems to me that the function might be more flexible if it accepts a broader range of input types, provided that the function f returns a subtype of Real.

Would expanding the accepted input types for x and y introduce any significant issues?