Skip to content

"Triangular matrix must be square" error for square triangular matrices #258

Closed
@diegozea

Description

@diegozea
julia> list_tril
3x3 Array{Int64,2}:
  0  0  0
  1  0  0
 -2  3  0

julia> cor(LowerTriangular(list_tril))
ERROR: ArgumentError: Triangular matrix must be square
 in similar at linalg/triangular.jl:27
 in cor at statistics.jl:430
 in eval_user_input at REPL.jl:64
 [inlined code] from REPL.jl:93
 in anonymous at task.jl:68

julia> cor(list_tril)
3x3 Array{Float64,2}:
   1.0        -0.944911  NaN  
  -0.944911    1.0       NaN  
 NaN         NaN           1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions