Skip to content

Scalar * Tensor operations fails #1097

Open
@ricardoV94

Description

@ricardoV94

Description

import pytensor.scalar as ps
import pytensor.tensor as pt

a = ps.float64("a")
b = pt.vector("b")

b * a  # Fine
a * b  # TypeError: TypeError: Cannot convert b to a scalar type

It tries to convert b to a scalar, which fails. When it fails, it should try to multiply b * a, which works

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