From 1ca2c00862a08b0addf800748b30162e858e0a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Alexandre=20C=C3=B4t=C3=A9?= Date: Mon, 17 Feb 2014 13:23:52 -0500 Subject: Update c-api.array.rst Add a note explaining the ``out`` parameter of some functions. --- doc/source/reference/c-api.array.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/source/reference/c-api.array.rst') diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index fcc4e6915..351b4238e 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -1877,6 +1877,18 @@ Calculation Equivalent to :meth:`ndarray.argmin` (*self*, *axis*). Return the index of the smallest element of *self* along *axis*. + + + +.. note:: + + The out argument specifies where to place the result. If out is + NULL, then the output array is created, otherwise the output is + placed in out which must be the correct size and type. A new + reference to the ouput array is always returned even when out + is not NULL. The caller of the routine has the responsability + to ``DECREF`` out if not NULL or a memory-leak will occur. + .. cfunction:: PyObject* PyArray_Max(PyArrayObject* self, int axis, PyArrayObject* out) Equivalent to :meth:`ndarray.max` (*self*, *axis*). Return the largest -- cgit v1.2.1