summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api
diff options
context:
space:
mode:
authorJoseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>2022-01-06 15:23:29 -0500
committerGitHub <noreply@github.com>2022-01-06 14:23:29 -0600
commit44b9cdb17c074daa0e5d747f02c45a49ad6d786a (patch)
tree345a43932067a1bc36e26f3cb5fea57f809f8141 /doc/source/reference/c-api
parent1684a933d6e4efa260434fd13b67a8ef34db7eca (diff)
downloadnumpy-44b9cdb17c074daa0e5d747f02c45a49ad6d786a.tar.gz
BUG: Added check for NULL data in ufuncs (#20689)
* BUG: Added check for NULL data in ufuncs * DOC: Made NULL refs more explicit * DOC: Added ..versionchanged:: tag
Diffstat (limited to 'doc/source/reference/c-api')
-rw-r--r--doc/source/reference/c-api/ufunc.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/source/reference/c-api/ufunc.rst b/doc/source/reference/c-api/ufunc.rst
index 95dc47839..c43743391 100644
--- a/doc/source/reference/c-api/ufunc.rst
+++ b/doc/source/reference/c-api/ufunc.rst
@@ -107,7 +107,10 @@ Types
Arbitrary data (extra arguments, function names, *etc.* )
that can be stored with the ufunc and will be passed in
- when it is called.
+ when it is called. May be ``NULL``.
+
+ .. versionchanged:: 1.23.0
+ Accepts ``NULL`` `data` in addition to array of ``NULL`` values.
This is an example of a func specialized for addition of doubles
returning doubles.
@@ -158,9 +161,10 @@ Functions
:c:type:`PyUFuncGenericFunction` items.
:param data:
- Should be ``NULL`` or a pointer to an array of size *ntypes*
- . This array may contain arbitrary extra-data to be passed to
- the corresponding loop function in the func array.
+ Should be ``NULL`` or a pointer to an array of size *ntypes*.
+ This array may contain arbitrary extra-data to be passed to
+ the corresponding loop function in the func array, including
+ ``NULL``.
:param types:
Length ``(nin + nout) * ntypes`` array of ``char`` encoding the