On Wed, Feb 12, 2025 at 5:12 PM Jayanth Tumuluri via NumPy-Discussion <
numpy-discussion@python.org> wrote:

> Hello,
>
> I noticed that current/past installations of Numpy do not have functions
> for secant, cosecant, and cotangent. Sometimes, there's a reason to use
> these over their less elegant forms of 1/cos, 1/sin, and 1/tan. Could this
> be something to be included in future installations of Numpy? I'd really
> appreciate it!
>

As for numpy itself, we've generally held the line for special/trig
functions that we'll add those that are in the C99 standard, and leave the
rest for scipy.special. These days, we defer to the Array API (if they add
a new elementwise function, we're likely going to add it), but they have a
roughly similar standard, though some functions that are really useful in
neural networks have also made the leap.

As for scipy.special, one of the considerations is if there are
implementations of those functions that do anything other than just taking
the reciprocal of the result of the main trig function. Taking a look at
our special function libraries, that we might tap for this, I'm not seeing
any that do implement these functions (the exception being the cotangent in
degrees, which Cephes implements, and we already expose in scipy.special).

-- 
Robert Kern
_______________________________________________
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