Skip to content

where not following Python scalar promotion rules? #131

Closed
@mdhaber

Description

@mdhaber

According to the standard for where,

Image

array_api_strict.where does not seem to implement this rule.

import array_api_strict as xp
x = xp.asarray([1., 2.])
xp.where(x > 1.5, x, 0)
# TypeError: array_api_strict.float64 and array_api_strict.int64 cannot be type promoted together

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions