[SciPy-user] Radians vs. degrees

Christian Meesters meesters at uni-mainz.de
Wed Oct 26 12:48:17 CDT 2005

On 26 Oct 2005, at 19:32, Fernando Perez wrote:
> why can't you just write a couple of top-level utilities like this
> r2d = pi/180.0
> dsin = lambda deg: sin(deg*r2d)
> dcos = lambda deg: cos(deg*r2d)
That's what I'm busy with - except for another bug which keeps me busy 
now :(
> and use explicitly dsin/dcos when you need the degree versions?
> As far as _any_ mechanism to globally flip sin/cos/etc to defaulting 
> silently
> to degrees, I'll be -1000 (and loudly) on that.  There are a million
> mathematical reasons why the core trig functions should remain, 
> always, in
> their proper units (radians - which aren't really a unit, btw).
Alright, I got the point and guess you are right. I feel convinced, 
think I overdid it a little.
> For something like this, 'explicit is better than implicit' is a good 
> one to
> remember.
Anyway, as long as it is explicitely mentioned in the docs ;-).


More information about the SciPy-user mailing list