Skip to content

corkendall and corspearman return different types #672

@adknudson

Description

@adknudson

When computing the correlation between a matrix and a vector, corspearman returns a 10x1 matrix while corkendall returns a 10-element vector. There should be consistent return types between these two functions.

Minimum example:

julia> z = rand(100, 100)

julia> x = rand(100)

julia> corspearman(z, x)
10×1 Matrix{Float64}:
[...]

julia corkendall(z, x)
10-element Vector{Float64}:
[...]

When switching the input order (corkendall(x, z) or corspearman(x, z)), the return type for both is a 1x10 Matrix, so I believe that corkendall(Matrix, Vector) should return a Matrix with 1 column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions