8000 WIP: Alternative ufunc signature expansion for flexible dimensions by mhvk · Pull Request #11165 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

WIP: Alternative ufunc signature expansion for flexible dimensions #11165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
improve docs for PyUFunc_FromFuncAndData
  • Loading branch information
mattip committed May 22, 2018
commit 67e752ee54da3fa68fa122fea98f3681785ac3dc
14 changes: 10 additions & 4 deletions doc/source/reference/c-api.ufunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
0