Skip to content

The max_version argument to __dlpack__ is not yet implemented #85

Closed
@njzjz

Description

@njzjz

I see that __array__ is removed in the latest version, and from_dlpack is suggested. But when I use it, I found that from_dlpack throws the following error:

>>> import numpy as np
>>> import array_api_strict
>>> np.from_dlpack(array_api_strict.asarray(0))
(1, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jz748/anaconda3/lib/python3.10/site-packages/array_api_strict/_array_object.py", line 592, in __dlpack__
    raise NotImplementedError("The max_version argument to __dlpack__ is not yet implemented")
NotImplementedError: The max_version argument to __dlpack__ is not yet implemented

version: numpy 2.1.3 array_api_strict 2.1.1

So, there is no way to convert an array_api_strict array to numpy?

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