-
Notifications
You must be signed in to change notification settings - Fork 54
[DLPack] Update to include DLPack C Exchange API #984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,19 @@ | |
|
|
||
|
|
||
| class _array: | ||
| """ | ||
| Attributes | ||
| ---------- | ||
| __dlpack_c_exchange_api__: PyCapsule | ||
rgommers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| An optional static array type attribute stored in ``type(array_instance).__dlpack_c_exchange_api__`` | ||
| that can be used to retrieve the DLPack C-API exchange API struct in DLPack 1.3 or later to speed up | ||
| exchange of array data at the C extension level without going through Python-level exchange. | ||
| See :ref:`data-interchange` section for more details. | ||
| """ | ||
|
|
||
| # use None for placeholder | ||
| __dlpack_c_exchange_api__: PyCapsule = None | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rendering this locally shows the one-line description goes missing:
I think the correct fix is to make it an |
||
|
|
||
| def __init__(self: array) -> None: | ||
| """Initialize the attributes for the array object class.""" | ||
|
|
||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.