[Numpy-discussion] Converting np.sinc into a ufunc

Charles R Harris charlesr.harris at gmail.com
Wed May 22 21:23:43 EDT 2019


On Wed, May 22, 2019 at 7:14 PM Marten van Kerkwijk <
m.h.vankerkwijk at gmail.com> wrote:

> On a more general note, if we change to a ufunc, it will get us stuck with
> sinc being the normalized version, where the units of the input have to be
> in the half-cycles preferred by signal-processing people rather than the
> radians preferred by mathematicians.
>
> In this respect, note that there is an outstanding issue about whether to
> allow one to choose between the two:
> https://github.com/numpy/numpy/issues/13457 (which itself was raised
> following an inconclusive PR that tried to add a keyword argument for it).
>
> Adding a keyword argument is much easier for a general function than for a
> ufunc.
>
>
I'd be tempted to have two sinc functions with the different
normalizations. Of course, one could say the same about trig functions in
both radians and degrees. If I had to pick one, I'd choose sinc in radians,
but I think that ship has sailed.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20190522/e3f8ef61/attachment.html>


More information about the NumPy-Discussion mailing list