Skip to content

get_vector_length incorrectly returns for shared variable without static shape #1239

Closed
@ricardoV94

Description

@ricardoV94

Description

import pytensor
import pytensor.tensor as pt
pt.get_vector_length(pytensor.shared(np.zeros(3,)))  # 3

It should raise because the variable has type.shape=(None,)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions