Skip to content

[RFC]: Add matrix assertion utilities to @stdlib/assert (tracking issue) #7334

Open
@Deepak91168

Description

@Deepak91168

Description

This RFC proposes adding basic matrix structure assertion utilities to the @stdlib/assert namespace.
These functions test whether an ndarray-like object conforms to specific matrix patterns listed below.

Matrix Assertion Checklist

  • is-null-matrix
    A matrix where all elements are zero. Learn more

  • is-identity-matrix
    A diagonal matrix where all diagonal elements are one. Learn more

  • is-diagonal-matrix
    A square matrix where all off-diagonal elements are zero. Learn more

  • is-upper-triangular-matrix
    A square matrix where all elements below the main diagonal are zero. Learn more

  • is-lower-triangular-matrix
    A square matrix where all elements above the main diagonal are zero. Learn more

  • is-permutation-matrix
    A binary square matrix with exactly one entry of 1 in each row and column, and 0s elsewhere. Learn more

Related Issues

No existing related issues

Questions

Would maintainers be open to including these matrix-related assertions in @stdlib/assert?
Let me know if any specific requirements need to be fulfilled.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions