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

Gabriel Gellner ggellner@uoguelph...
Mon Nov 24 15:22:02 CST 2008

> There is resistance. Please don't remove the old names. Also note that 
> your proposed change will alter people's code in subtle, but potentially 
> very "interesting" ways:
> >>> from math import *
> >>> from numpy import *
> >>> type(arcsin(1)) is type(asin(1))
> False
> >>> from numpy import arcsin as transformacion_del_arco_seno
> >>> arcsin == transformacion_del_arco_seno
> True
> asin(1j) raises an exception, arcsin doesn't. They are *different* 
> functions, hence the names.

>>> type(np.sin(1)) == type(math.sin(1))

And they have the same name. Isn't this what name spaces are for? I think it is
strange that some of the math functions have the same name, and some don't. I
can't see how being different functions justifies this, or we need to rename
the normal trig functions.

I can see not wanting to break API compatibility but I don't find the
`different functions` argument compelling.


More information about the Numpy-discussion mailing list