summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api/array.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference/c-api/array.rst')
-rw-r--r--doc/source/reference/c-api/array.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index 56fc59da3..10c1704c2 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -251,7 +251,6 @@ From scratch
.. versionadded:: 1.6
This function steals a reference to *descr* if it is not NULL.
-
This array creation routine allows for the convenient creation of
a new array matching an existing array's shapes and memory layout,
possibly changing the layout and/or data type.
@@ -634,8 +633,17 @@ From other objects
requirements set to :c:data:`NPY_ARRAY_DEFAULT` and the type_num member of the
type argument set to *typenum*.
-.. c:function:: PyObject *PyArray_FromObject( \
- PyObject *op, int typenum, int min_depth, int max_depth)
+.. c:function:: PyObject* PyArray_ContiguousFromObject( \
+ PyObject* op, int typenum, int min_depth, int max_depth)
+
+ This function returns a well-behaved C-style contiguous array from any nested
+ sequence or array-interface exporting object. The minimum number of dimensions
+ the array can have is given by `min_depth` while the maximum is `max_depth`.
+ This is equivalent to call :c:func:`PyArray_FromAny` with requirements
+ :c:data:`NPY_ARRAY_DEFAULT` and :c:data:`NPY_ARRAY_ENSUREARRAY`.
+
+.. c:function:: PyObject* PyArray_FromObject( \
+ PyObject* op, int typenum, int min_depth, int max_depth)
Return an aligned and in native-byteorder array from any nested
sequence or array-interface exporting object, op, of a type given by