From 48a2d8c39bb58611307122f55da6f0e99cf86086 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 9 Mar 2021 17:19:50 -0700 Subject: Add a small docstring to the array API ndarray object --- numpy/_array_api/_array_object.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'numpy/_array_api/_array_object.py') 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 ` 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 -- cgit v1.2.1