Skip to content

Create a generic helper for checks on __array_namespace__ #601

Closed
2 of 2 issues completed
Closed

Description

@Saransh-cpp
if a.__array_namespace__() != b.__array_namespace__():
    msg = "input arrays should belong to the same array library"
    raise ValueError(msg)

xp = a.__array_namespace__()

Should we make this into a generic helper? Seeing as all functions will need it

Originally posted by @paddyroddy in #423 (comment)

Activity

  1. self-assigned this
    on Apr 8, 2025
  2. added 2 commits that reference this issue on Apr 9, 2025
  3. added a commit that references this issue on Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

maintenanceMaintenance: refactoring, typos, etc.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions