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

Method fill

funct/Array.py:788–792  ·  view source on GitHub ↗

Replaces all elements of this Array with given object.

(self, e, inplace=False)

Source from the content-addressed store, hash-verified

786 return self
787
788 def fill(self, e, inplace=False):
789 """ Replaces all elements of this Array with given object. """
790 if inplace:
791 return self.__setinplace(e, inplace)
792 return Array([e] * self.size)
793
794 def fill_(self, e):
795 """ Replaces (in place) all elements of this Array with given object. """

Callers 1

testMethod · 0.95

Calls 2

__setinplaceMethod · 0.95
ArrayClass · 0.85

Tested by 1

testMethod · 0.76