summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/c-api.array.rst26
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index 498b2a448..369360407 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -1667,18 +1667,20 @@ Conversion
copied into every location. A -1 is returned if an error occurs,
otherwise 0 is returned.
-.. cfunction:: PyObject* PyArray_View(PyArrayObject* self, PyArray_Descr* dtype)
-
- Equivalent to :meth:`ndarray.view` (*self*, *dtype*). Return a new view of
- the array *self* as possibly a different data-type, *dtype*. If
- *dtype* is ``NULL``, then the returned array will have the same
- data type as *self*. The new data-type must be consistent with
- the size of *self*. Either the itemsizes must be identical, or
- *self* must be single-segment and the total number of bytes must
- be the same. In the latter case the dimensions of the returned
- array will be altered in the last (or first for Fortran-style
- contiguous arrays) dimension. The data area of the returned array
- and self is exactly the same.
+.. cfunction:: PyObject* PyArray_View(PyArrayObject* self, PyArray_Descr* dtype, PyTypeObject *ptype)
+
+ Equivalent to :meth:`ndarray.view` (*self*, *dtype*). Return a new
+ view of the array *self* as possibly a different data-type, *dtype*,
+ and different array subclass *ptype*.
+
+ If *dtype* is ``NULL``, then the returned array will have the same
+ data type as *self*. The new data-type must be consistent with the
+ size of *self*. Either the itemsizes must be identical, or *self* must
+ be single-segment and the total number of bytes must be the same.
+ In the latter case the dimensions of the returned array will be
+ altered in the last (or first for Fortran-style contiguous arrays)
+ dimension. The data area of the returned array and self is exactly
+ the same.
Shape Manipulation