Message155890
I'm not quite sure why that formula would be "elegant" in the first place, and I most certainly don't understand why
0.5*sign((100*YY)+MM-190002.5) + 0.5
is more elegant than
((100*YY)+MM > 190002.5)
or
(((YY = 1900) and (MM > 2.5)) or (YY > 1900))
or rather: implementing leap years correctly in the first place, so the formula also works outside of the 1800-2099 range.
And, in general, I don't understand the problem. Everyone who does scientific computing has numpy *anyway*, so there is no gain for them.
As a last note, the C math.h also doesn't have a sign() function, and only a copysign() function: http://en.wikipedia.org/wiki/C_mathematical_functions |
|
Date |
User |
Action |
Args |
2012-03-15 14:31:29 | valhallasw | set | recipients:
+ valhallasw, georg.brandl, rhettinger, mark.dickinson, gekonntde, fkbreitl |
2012-03-15 14:31:29 | valhallasw | set | messageid: <1331821889.35.0.664450354553.issue829370@psf.upfronthosting.co.za> |
2012-03-15 14:31:28 | valhallasw | link | issue829370 messages |
2012-03-15 14:31:28 | valhallasw | create | |
|