MCPcopy Create free account
hub / github.com/apache/singa / __radd__

Method __radd__

python/singa/tensor.py:736–741  ·  view source on GitHub ↗
(self, lhs)

Source from the content-addressed store, hash-verified

734 return _call_singa_func(singa.EQFloat, self.data, float(rhs))
735
736 def __radd__(self, lhs):
737 lhs = float(lhs)
738 one = Tensor(self.shape, self.device, self.dtype)
739 one.set_value(lhs)
740 one += self
741 return one
742
743 def __rsub__(self, lhs):
744 lhs = float(lhs)

Callers

nothing calls this directly

Calls 2

set_valueMethod · 0.95
TensorClass · 0.70

Tested by

no test coverage detected