Skip to content

pt.linalg.det should eagerly fail if known shapes are not square #856

Closed
@jessegrabowski

Description

@jessegrabowski

Description

The following graph is invalid:

x = pt.tensor('x', shape=(5,3)
y = pt.linalg.det(x)

This will happily construct a graph, but it will always fail at runtime when the perform method is called, because the numpy implementation will raise an error. There's no reason we can't check add a check to make_node testing if 1) the shape of the input is known and, 2) if it is valid.

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