You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a dlpack distribution package exists in PyPI (https://pypi.org/project/dlpack/) pointing to this repo, but it is just an empty package. At the same time, this repo contains a sample implementation of the dlpack interface in pure Python using ctypes (https://github.com/dmlc/dlpack/blob/main/apps/numpy_dlpack/dlpack/dlpack.py) which seems quite useful on its own. For example, it could be used for adding preliminary dlpack support to other Python frameworks, and for simple prototyping and experimentation purposes (it seems there are already copies of this code in several GitHub repositories).
I would like to suggest to update the PyPI package with the contents of dlpack.py. The other Python files in the repo (from_numpy.py, to_numpy.py) don't need to be included since they only implement a particular example of how to use the defined interfaces with NumPy. Additionally, the ctypes definition of the deleter function could be added as an alias Deleter_CFUNTYPE = ctypes.CFUNCTYPE(None, ctypes.c_void_p) for easy of use, although it is not strictly required.
The text was updated successfully, but these errors were encountered:
Currently a
dlpack
distribution package exists in PyPI (https://pypi.org/project/dlpack/) pointing to this repo, but it is just an empty package. At the same time, this repo contains a sample implementation of the dlpack interface in pure Python using ctypes (https://github.com/dmlc/dlpack/blob/main/apps/numpy_dlpack/dlpack/dlpack.py) which seems quite useful on its own. For example, it could be used for adding preliminary dlpack support to other Python frameworks, and for simple prototyping and experimentation purposes (it seems there are already copies of this code in several GitHub repositories).I would like to suggest to update the PyPI package with the contents of
dlpack.py
. The other Python files in the repo (from_numpy.py
,to_numpy.py
) don't need to be included since they only implement a particular example of how to use the defined interfaces with NumPy. Additionally, the ctypes definition of the deleter function could be added as an aliasDeleter_CFUNTYPE = ctypes.CFUNCTYPE(None, ctypes.c_void_p)
for easy of use, although it is not strictly required.The text was updated successfully, but these errors were encountered: