26 Feb
2013
26 Feb
'13
3:35 a.m.
Hi, Le 23/02/2013 20:25, Nathaniel Smith a écrit :
My gut feeling is that we have too many methods on ndarray, not too few, but in any case, can you elaborate? What's the rationale for why np.abs(a) is so much harder than a.abs(), and why this function and not other unary functions? (Just another usecase where I see the x.abs() notation useful)
If x is a complex array, I feel that x.abs() and x.angle() would be natural complements to x.real and x.imag. Of course, x.angle() only make much sense for complex arrays while x.abs() makes sense for any numerical array. best, Pierre