Skip to content

axis argument to matrix_norm #318

Closed
@asmeurer

Description

@asmeurer

The matrix_norm function has an axis argument to specify the axes that the matrices are stacked on, defaulting to the last two axes. This is currently the only matrix function that allows specifying this. All other matrix functions assume matrices are stacked on the last two axes. To work with stacks on other axes, the array axes must first be transposed using something like permute_dims.

The axis/axes argument is present in vector_norm, cross, and tensordot, but the first two of those operate on 1-D vectors and the last operates on arbitrary tensors. The axis argument to matrix_norm is a holdover from the split of norm, which handled both matrix and vector norms at the same time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions