summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-12-16 18:07:57 +0200
committermattip <matti.picus@gmail.com>2020-01-16 08:24:45 +1100
commitf38504c5bef425c7dbd372c904a7d9e9bbfe389c (patch)
tree796f9faf611abb1fb8388c12d180c67dc2537b52 /doc/source/reference/c-api
parent266c588b393ea0d3b89d583e014e9befe654bed2 (diff)
downloadnumpy-f38504c5bef425c7dbd372c904a7d9e9bbfe389c.tar.gz
MAINT: remove undocumented use of context in __array__(dtype, context)
Diffstat (limited to 'doc/source/reference/c-api')
-rw-r--r--doc/source/reference/c-api/array.rst21
1 files changed, 10 insertions, 11 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index 2eaf3a27a..3581e3abe 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -426,10 +426,8 @@ From other objects
may be 0. Also, if *op* is not already an array (or does not
expose the array interface), then a new array will be created (and
filled from *op* using the sequence protocol). The new array will
- have :c:data:`NPY_ARRAY_DEFAULT` as its flags member. The *context* argument
- is passed to the :obj:`~numpy.class.__array__` method of *op* and is only used if
- the array is constructed that way. Almost always this
- parameter is ``NULL``.
+ have :c:data:`NPY_ARRAY_DEFAULT` as its flags member. The *context*
+ argument is unused.
.. c:var:: NPY_ARRAY_C_CONTIGUOUS
@@ -574,6 +572,8 @@ From other objects
:c:data:`NPY_ARRAY_WRITEABLE` to PyArray_FromAny, where the writeable array may
be a copy of the input.
+ `context` is not used.
+
When success (0 return value) is returned, either out_arr
is filled with a non-NULL PyArrayObject and
the rest of the parameters are untouched, or out_arr is
@@ -677,10 +677,8 @@ From other objects
PyObject* op, PyArray_Descr* dtype, PyObject* context)
Return an ndarray object from a Python object that exposes the
- :obj:`~numpy.class.__array__` method. The :obj:`~numpy.class.__array__` method can take 0, 1, or 2
- arguments ([dtype, context]) where *context* is used to pass
- information about where the :obj:`~numpy.class.__array__` method is being called
- from (currently only used in ufuncs).
+ :obj:`~numpy.class.__array__` method. The :obj:`~numpy.class.__array__`
+ method can take 0, or 1 argument ``([dtype])``. ``context`` is unused.
.. c:function:: PyObject* PyArray_ContiguousFromAny( \
PyObject* op, int typenum, int min_depth, int max_depth)
@@ -859,15 +857,16 @@ General check of Python Type
conversion occurs. Otherwise, out will contain a borrowed
reference to :c:data:`Py_NotImplemented` and no error condition is set.
-.. c:function:: PyArray_HasArrayInterfaceType(op, type, context, out)
+.. c:function:: PyArray_HasArrayInterfaceType(op, dtype, context, out)
If ``op`` implements any part of the array interface, then ``out``
will contain a new reference to the newly created ndarray using
the interface or ``out`` will contain ``NULL`` if an error during
conversion occurs. Otherwise, out will contain a borrowed
reference to Py_NotImplemented and no error condition is set.
- This version allows setting of the type and context in the part of
- the array interface that looks for the :obj:`~numpy.class.__array__` attribute.
+ This version allows setting of the dtype in the part of the array interface
+ that looks for the :obj:`~numpy.class.__array__` attribute. `context` is
+ unused.
.. c:function:: PyArray_IsZeroDim(op)