MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __imul__

Method __imul__

tensorflow/python/training/tracking/data_structures.py:334–345  ·  view source on GitHub ↗
(self, y)

Source from the content-addressed store, hash-verified

332 return self.__class__(self._storage + getattr(other, "_storage", other))
333
334 def __imul__(self, y):
335 if y <= 0:
336 raise ValueError(
337 "List only supports append, multiplying in place by %d removes "
338 "elements." % y)
339
340 n = len(self._storage)
341 for _ in range(y - 1):
342 for i in range(n):
343 self.append(self._storage[i])
344
345 return self
346
347 def __mul__(self, n):
348 return self.__class__(self._storage * n)

Callers 1

__imul__Method · 0.45

Calls 2

appendMethod · 0.95
rangeFunction · 0.50

Tested by

no test coverage detected