MCPcopy Create free account
hub / github.com/Lauriat/funct / abs

Method abs

funct/Array.py:169–174  ·  view source on GitHub ↗

Element-wise absolute value.

(self, inplace=False)

Source from the content-addressed store, hash-verified

167 return self
168
169 def abs(self, inplace=False):
170 """ Element-wise absolute value. """
171 a = map(abs, self)
172 if inplace:
173 return self.__setinplace(a, inplace)
174 return Array(a)
175
176 def abs_(self):
177 """ Inplace element-wise absolute value. """

Callers 2

abs_Method · 0.95
testMethod · 0.95

Calls 2

__setinplaceMethod · 0.95
ArrayClass · 0.85

Tested by 1

testMethod · 0.76