[Numpy-discussion] Proposal for changing the names of inverse trigonometrical/hyperbolic functions

Francesc Alted faltet at pytables.org
Mon Nov 24 13:45:56 EST 2008


Hi,

After dealing with another issue, I realized that the names of inverse 
trigonometrical/hyperbolic functions in NumPy don't follow the main 
standards in computer science.  For example, where Python writes:

asin, acos, atan, asinh, acosh, atanh

NumPy choose:

arcsin, arccos, arctan, arcsinh, arccosh, arctanh

And not only Python, the former also seems to be the standard in 
computer science.  Quoting:

http://en.wikipedia.org/wiki/Inverse_hyperbolic_function

"""
The usual abbreviations for them in mathematics are arsinh, arcsinh (in 
the USA) or asinh (in computer science).
...
The acronyms arcsinh, arccosh etc. are commonly used, even though they 
are misnomers, since the prefix arc is the abbreviation for arcus, 
while the prefix ar stands for area.
"""

So, IMHO, I think it would be better to rename the inverse trigonometric 
functions from ``arc*`` to ``a*`` prefix.  Of course, in order to do 
that correctly, one should add the new names and add a 
``DeprecationWarning`` informing that people should start to use the 
new names.  After two or three NumPy versions, the old function names 
can be removed safely.

What people think?

-- 
Francesc Alted



More information about the NumPy-Discussion mailing list