8000 np.linalg.qr: handle empty matrices · Issue #11412 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

np.linalg.qr: handle empty matrices #11412

@convexset

Description

@convexset

This may seem silly, but raising exceptions for mathematically legitimate request causes problems downstream.

See: dask/dask#3659 (weird case of distributed computation where there is an empty 0×n matrix that needs to be handled by np.linalg.qr; this happens when a distributed array of blocks blocks, called chunks in dask, are filtered, and it is unknown a priori which blocks, if any, are empty)

There are two cases, both of which are "mathematically legitimate":

  • 0×n -> q is 0×0 and r is 0×n
  • m×0 -> q is m×0 and r is 0×0

If this suggestion is found to be reasonable, I'll create a PR.

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

      0