summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_array_object.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-03-09 17:19:50 -0700
committerAaron Meurer <asmeurer@gmail.com>2021-03-09 17:19:50 -0700
commit48a2d8c39bb58611307122f55da6f0e99cf86086 (patch)
tree4385455f108748f0bb0e3e3b8eace562633ff034 /numpy/_array_api/_array_object.py
parent6c17d4bfd080c00082efa60891212f95b2500c18 (diff)
downloadnumpy-48a2d8c39bb58611307122f55da6f0e99cf86086.tar.gz
Add a small docstring to the array API ndarray object
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-rw-r--r--numpy/_array_api/_array_object.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py
index 247194017..e9ea6ef45 100644
--- a/numpy/_array_api/_array_object.py
+++ b/numpy/_array_api/_array_object.py
@@ -24,6 +24,20 @@ from ._dtypes import _boolean_dtypes, _integer_dtypes
import numpy as np
class ndarray:
+ """
+ ndarray object for the array API namespace.
+
+ See the docstring of :py:obj:`np.ndarray <numpy.ndarray>` for more
+ information.
+
+ This is a wrapper around numpy.ndarray that restricts the usage to only
+ those things that are required by the array API namespace. Note,
+ attributes on this object that start with a single underscore are not part
+ of the API specification and should only be used internally. This object
+ should not be constructed directly. Rather, use one of the creation
+ functions, such as asarray().
+
+ """
# Use a custom constructor instead of __init__, as manually initializing
# this class is not supported API.
@classmethod