8000 [Consistency] Default axes in `linalg.diagonal` and `linalg.trace`. · Issue #215 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content
[Consistency] Default axes in linalg.diagonal and linalg.trace. #215
Closed
@lezcano

Description

@lezcano

The functions linalg.trace and linalg.diagonal have as default axis1=0, axis2=1.

This goes against the rest of the documentation, in which a batch of matrices is defined as a tensor with shape (..., M, N).

It would be more consistent with the rest of the API to have axis1=-2, axis2=-1 to handle batches of matrices correctly by default.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0