diff options
author | mattip <matti.picus@gmail.com> | 2018-05-09 12:12:52 +0300 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-05-28 09:32:07 -0400 |
commit | 4291c9440b6586bc6b9deec55178c21f935b02a7 (patch) | |
tree | ac67b5b953a21f16ed3514a550397eb944c075e6 /doc/source | |
parent | 69458b02956d39082014573eb0350ae3eb3436ee (diff) | |
download | numpy-4291c9440b6586bc6b9deec55178c21f935b02a7.tar.gz |
DOC: improve docs for PyUFunc_FromFuncAndData.
Diffstat (limited to 'doc/source')
-rw-r--r-- | doc/source/reference/c-api.ufunc.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/source/reference/c-api.ufunc.rst b/doc/source/reference/c-api.ufunc.rst index 79ad256f5..5ac34edc1 100644 --- a/doc/source/reference/c-api.ufunc.rst +++ b/doc/source/reference/c-api.ufunc.rst @@ -93,12 +93,18 @@ Functions the corresponding 1-d loop function in the func array. :param types: - Must be of length (*nin* + *nout*) \* *ntypes*, and it - contains the data-types (built-in only) that the corresponding - function in the *func* array can deal with. + Int8 of length `(nin + nout) * ntypes` It encodes the :ref:`dtype.num` + (built-in only) that the corresponding function in the `func` array + accepts. For a ufunc with two `ntypes`, one `nin` and one `nout` where + the first function accepts and returns `int32` and the second accepts + and returns `int64`, `types` would be `\05\05\07\07` since `int32.num` + is 5 and `int64.num` is 7. + + :ref:`casting-rules` will be used at runtime to find the first `func` callable + by the input/output provided. :param ntypes: - How many different data-type "signatures" the ufunc has implemented. + How many different data-type-specific functions the ufunc has implemented. :param nin: The number of inputs to this operation. |