Skip to content

TYP: SetIndex missing None? #822

Description

@lucascolley
In [1]: import array_api_strict as xp; import array_api_extra as xpx

In [2]: x = xp.asarray(0)

In [3]: x = xpx.at(x)[None].set(2); x
Out[3]: Array(2, dtype=array_api_strict.int64)

@crusaderky should

SetIndex: TypeAlias = (
int | slice | EllipsisType | Array | tuple[int | slice | EllipsisType | Array, ...]
)
have None in the union? Or am I misunderstanding the at interface?

x-ref https://github.com/scipy/scipy/pull/25517/changes#r3493017024

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

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions