Skip to content

Scalar * Tensor operations fails #1097

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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