Skip to content

Bad input to the broadcast_to function triggers an internal-check error #505

@JoelPasvolsky

Description

@JoelPasvolsky

The broadcast_to below triggers an error

>>> broadcast_to(model.constant([[2, 3], [4, 5]]), model.constant(5))
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

on the code checking for whether the symbol needs to be reshaped or not: if x.shape() == shape or (isinstance(shape, int) and x.shape() == (shape,))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions