Skip to content

Matrix can have negative dimensions, which should raise ValueError when encountered. #1004

Description

@haydenwong7bm
>>> A = matrix(2, -1)
>>> A.rows, A.cols
(2, -1)
>>> matrix(-1, 2) * matrix(2, -1)
matrix(
[])
>>> _.rows, _.cols
(-1, -1)
>>> A = matrix(2, 2)
>>> A.cols = -1
>>> A.rows = -1
>>> A.cols, A.rows
(-1, -1)
>>> A
matrix(
[])
>>> det(A)
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions