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

Method __radd__

examples/model_selection/Trails/singa_pkg_code/tensor.py:712–717  ·  view source on GitHub ↗
(self, lhs)

Source from the content-addressed store, hash-verified

710 return _call_singa_func(singa.EQFloat, self.data, rhs)
711
712 def __radd__(self, lhs):
713 lhs = float(lhs)
714 one = Tensor(self.shape, self.device, self.dtype)
715 one.set_value(lhs)
716 one += self
717 return one
718
719 def __rsub__(self, lhs):
720 lhs = float(lhs)

Callers

nothing calls this directly

Calls 2

set_valueMethod · 0.95
TensorClass · 0.70

Tested by

no test coverage detected