Skip to content

pow(matrix, n) can easily be extended to negative n #2463

@gwhitney

Description

@gwhitney

The typical meaning of M^(-2) would be inv(M)^2. It would seem reasonable to extend pow(M,n) to negative n in this way. There doesn't seem to be any risk; pow(M,-2) might throw an error if M is noninvertible, but it always throws an error at the moment. Unless some problem with this extension is foreseen, I will extend the definition of pow(M, n) in this way when I get a chance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions