Skip to content

Do we want np.asarray(Array) to work? #3

Closed as not planned
Closed as not planned

Description

@nicola-bastianello

is it even possible? this is of course not necessary as we expose to_numpy already, but it is very common to do such an operation

Activity

  1. Simpag commented on May 16, 2026

    @Simpag
    Collaborator

    It would be risky. We can make it work by adding __array__ method to the Array class but then we have to assume that every framework supports np.asarray(framework_tensor) and I think that might lead to bugs in the future. Furthermore, device handling might make it break

  2. nicola-bastianello commented on May 18, 2026

    @nicola-bastianello
    MemberAuthor

    good points, then let's only support to_numpy

  3. nicola-bastianello commented on May 25, 2026

    @nicola-bastianello
    MemberAuthor

    let's close this?

  4. Simpag commented on May 25, 2026

    @Simpag
    Collaborator

    Yeah I think it might cause more trouble than it’s worth

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

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions