On Fri, Jul 12, 2024 at 7:47 AM Sebastian Berg
<sebast...@sipsolutions.net> wrote:
>

> (You won't be able to know these relations from reading the signature,
> but I doubt it's worth worrying about that.)

After creating the gufunc with `PyUFunc_FromFuncAndDataAndSignature`,
the gufunc author could set the `core_signature` field at the same
time that `process_core_dims_func` is set.  That requires freeing the
old signature and allocating memory for the new one.  For the 1-d
convolution example, the signature would be set to `"(m),(n)->(m + n -
1)"`:

```
In [1]: from experiment import conv1d_full

In [2]: conv1d_full.signature
Out[2]: '(m),(n)->(m + n - 1)'
```

Warren
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to