[Numpy-discussion] request for new array method: arr.abs()

Sebastian Haase haase at msg.ucsf.edu
Wed Aug 23 15:51:02 CDT 2006


Hi!
numpy renamed the *function* abs to absolute.
Most functions like mean, min, max, average, ...
have an equivalent array *method*.

Why is absolute left out ?
I think it should be added .

Furthermore, looking at some line  of code that have multiple calls to 
absolute [ like f(absolute(a), absolute(b), absolute(c)) ]
I think "some people" might prefer less typing and less reading,
like f( a.abs(), b.abs(), c.abs() ).
One could even consider not requiring the "function call" parenthesis '()'  at 
all - but I don't know about further implications that might have.

Thanks,
Sebastian Haase

PS: is there any performace hit in using the built-in abs function ?





More information about the Numpy-discussion mailing list