summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api
diff options
context:
space:
mode:
authorChiara Marmo <chiara.marmo@inria.fr>2021-07-27 12:03:05 +0200
committerChiara Marmo <chiara.marmo@inria.fr>2021-07-27 12:03:05 +0200
commit51d69005c6611c245aae51dc987bab83d5cded48 (patch)
treea59fab1209fccacee136695299fd0e04c37de972 /doc/source/reference/c-api
parentc515310bf531bb8d6e70c091081bffc7f054bf9b (diff)
downloadnumpy-51d69005c6611c245aae51dc987bab83d5cded48.tar.gz
Address some comments.
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 44179d778..c7a2576c0 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -1250,8 +1250,8 @@ Converting data types
function returns :c:data:`NPY_FALSE`.
-New data types
-^^^^^^^^^^^^^^
+User-defined data types
+^^^^^^^^^^^^^^^^^^^^^^^
.. c:function:: void PyArray_InitArrFuncs(PyArray_ArrFuncs* f)
@@ -1278,14 +1278,6 @@ New data types
registered (checked only by the address of the pointer), then
return the previously-assigned type-number.
-.. c:function:: int PyArray_TypeNumFromName( \
- char const *str)
-
- Given a string return the type-number for the data-type with that string as
- the type-object name.
- Returns NPY_NOTYPE without setting an error if no type can be found.
- Only works for user-defined data-types.
-
.. c:function:: int PyArray_RegisterCastFunc( \
PyArray_Descr* descr, int totype, PyArray_VectorUnaryFunc* castfunc)
@@ -1303,6 +1295,13 @@ New data types
*descr* can be cast safely to a data-type whose type_number is
*totype*.
+.. c:function:: int PyArray_TypeNumFromName( \
+ char const *str)
+
+ Given a string return the type-number for the data-type with that string as
+ the type-object name.
+ Returns NPY_NOTYPE without setting an error if no type can be found.
+ Only works for user-defined data-types.
Special functions for NPY_OBJECT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -2565,7 +2564,7 @@ Broadcasting (multi-iterators)
.. c:function:: int PyArray_MultiIter_SIZE(PyObject* multi)
- Returne the size of the multi-iterator object.
+ Returns the size of the multi-iterator object.
.. c:function:: int PyArray_Broadcast(PyArrayMultiIterObject* mit)