There needs to have a method `ndarray.abs()`. For example, let `x = numpy.array([-1, 0, 2])`, very often I need to compute elementwise absolute value like `x.abs()` whose expected result is `numpy.array([1, 0, 2])`. But until now I need to write `numpy.abs(x)`, which is not so convenient. I believe many people want this feature. Actually, I wait this method for more than ten years, but it still has not appear yet. So I decide to report this requist. _______________________________________________ NumPy-Discussion mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/numpy-discussion.python.org Member address: [email protected]
[Numpy-discussion] Requist for method `ndarray.abs()`
Zhen Li via NumPy-Discussion Wed, 07 Jan 2026 05:36:32 -0800
