Re: [Numpy-discussion] RAdian <--> degres conversion

Do we really need these functions in numpy? I mean it's just multiplying/dividing the value by pi/180 (who knows why they're in the math module..). Numpy doesn't have asin, acos, or atan either (they're arcsin, arcos and arctan) so it isn't a superset of the math module. I would like there to be fewer functions in numpy, not more.
Someone on the wxPython list just pointed out that the math module now includes includes angle-conversion utilities:
degrees.__doc__ degrees(x) -> converts angle x from radians to degrees radians.__doc__ radians(x) -> converts angle x from degrees to radians
Not a big deal, but handy. As I generally like to think if numpy as a superset of the math module, perhaps is should include these too.
Done.

On Sonntag 16 Dezember 2007, Neil Crighton wrote:
Do we really need these functions in numpy? I mean it's just multiplying/dividing the value by pi/180 (who knows why they're in the math module..).
I like them in math ("explicit is better than implicit"*), but I don't want to comment on whether they should be in numpy. (*: It's similar with math.hypot, which I have got to know and appreciate nowadays.) Ciao, / / .o. /--/ ..o / / ANS ooo

On 16/12/2007, Hans Meine <meine@informatik.uni-hamburg.de> wrote:
(*: It's similar with math.hypot, which I have got to know and appreciate nowadays.)
I'd like to point out that math.hypot is a nontrivial function which is easy to get wrong: In [6]: x=1e200; y=1e200; In [7]: math.hypot(x,y) Out[7]: 1.414213562373095e+200 In [8]: math.sqrt(x**2+y**2) --------------------------------------------------------------------------- <type 'exceptions.OverflowError'> Traceback (most recent call last) /home/peridot/<ipython console> in <module>() <type 'exceptions.OverflowError'>: (34, 'Numerical result out of range') Anne
participants (3)
-
Anne Archibald
-
Hans Meine
-
Neil Crighton