[Request] Update PyPI package with interfaces defined in dlpack.py
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 169
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.