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

Method round

funct/Array.py:227–232  ·  view source on GitHub ↗

Rounds the Array to the given number of decimals.

(self, d=0, inplace=False)

Source from the content-addressed store, hash-verified

225 return self
226
227 def round(self, d=0, inplace=False):
228 """ Rounds the Array to the given number of decimals. """
229 a = map(lambda e: round(e, d), self)
230 if inplace:
231 return self.__setinplace(a, inplace)
232 return Array(a)
233
234 def round_(self, d=0):
235 """ Rounds the Array in-place to the given number of decimals. """

Callers 1

testMethod · 0.80

Calls 2

__setinplaceMethod · 0.95
ArrayClass · 0.85

Tested by 1

testMethod · 0.64