Skip to content

Dimension check too restrictive in copytrito! and lacpy! #1074

Closed
JuliaLang/julia
#54587
@amontoison

Description

@amontoison

In JuliaLang/julia#51909, I interfaced copytri! and lacpy!, but I didn't test them on rectangular matrices. The check:

(m1 < m || n1 < n) && throw(DimensionMismatch(lazy"B of size ($m1,$n1) should have at least the same number of rows and columns as A of size ($m,$n)"))

is too restrictive in two cases.

  1. If A has more rows than columns and uplo = 'U', B only needs to be p x p, where p is the number of columns of A. A common application of this is performing a reduced QR on A.

  2. Similarly, if A has more columns than rows and uplo = 'L', B only needs to be t x t, where t is the number of rows of A. This is relevant when performing a reduced LQ on A.

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