Skip to content

Should meshgrid return a list or a tuple of coordinate arrays? #938

Open
@ev-br

Description

@ev-br

The spec stipulates that meshgrid returns a list of arrays, https://data-apis.org/array-api/draft/API_specification/generated/array_api.meshgrid.html

NumPy and Pytorch, however, return tuples. Jax and CuPy return lists. Makes me wonder if specifying a list is a conscious decision: I seem to recall that tuples are generally more JIT-friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions