diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-11-09 13:18:57 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 13:18:57 -0600 |
commit | 0de29c58e3eede2bb65b51dbf72a93b767d04d49 (patch) | |
tree | 1c4bcd57119ec18d434bcd8947783d1d377299f8 /numpy/array_api | |
parent | c280e21a74f2a6fd16d9c318696fcf167689baa3 (diff) | |
parent | 5b94a03b93d171232e0a64dc2160e4f2139e9b1a (diff) | |
download | numpy-0de29c58e3eede2bb65b51dbf72a93b767d04d49.tar.gz |
Merge pull request #19083 from hameerabbasi/dlpack
ENH: Implement the DLPack Array API protocols for ndarray.
Diffstat (limited to 'numpy/array_api')
-rw-r--r-- | numpy/array_api/__init__.py | 4 | ||||
-rw-r--r-- | numpy/array_api/_creation_functions.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/array_api/__init__.py b/numpy/array_api/__init__.py index d8b29057e..89f5e9cba 100644 --- a/numpy/array_api/__init__.py +++ b/numpy/array_api/__init__.py @@ -136,7 +136,7 @@ from ._creation_functions import ( empty, empty_like, eye, - from_dlpack, + _from_dlpack, full, full_like, linspace, @@ -155,7 +155,7 @@ __all__ += [ "empty", "empty_like", "eye", - "from_dlpack", + "_from_dlpack", "full", "full_like", "linspace", diff --git a/numpy/array_api/_creation_functions.py b/numpy/array_api/_creation_functions.py index e36807468..c3644ac2c 100644 --- a/numpy/array_api/_creation_functions.py +++ b/numpy/array_api/_creation_functions.py @@ -151,7 +151,7 @@ def eye( return Array._new(np.eye(n_rows, M=n_cols, k=k, dtype=dtype)) -def from_dlpack(x: object, /) -> Array: +def _from_dlpack(x: object, /) -> Array: # Note: dlpack support is not yet implemented on Array raise NotImplementedError("DLPack support is not yet implemented") |