[Numpy-discussion] Converting np.sinc into a ufunc
ralf.gommers at gmail.com
Thu May 23 05:59:37 EDT 2019
On Thu, May 23, 2019 at 3:24 AM Charles R Harris <charlesr.harris at gmail.com>
> 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.
Please let's not add more functions. This shouldn't be in numpy in the
first place if we had that choice today (but the ship has sailed). I'd
refer to scipy.special.sinc rather than expand the coverage here in ways
that are specific to signal processing or some other domain.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion