diff options
Diffstat (limited to '')
-rw-r--r-- | src/scalar.py (renamed from src/value.py) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/value.py b/src/scalar.py index af0ab35..a67b7ae 100644 --- a/src/value.py +++ b/src/scalar.py @@ -1,4 +1,4 @@ -class Value: +class Scalar: def __init__(self, data, _children=(), _op='', label='') -> None: self.label = label @@ -9,12 +9,12 @@ class Value: self._op = _op def __repr__(self) -> str: - return f'Value({self.data})' + return f'Scalar({self.data})' def __add__(self, y): result = self.data + y.data - return Value(result, (self, y), _op='+') + return Scalar(result, (self, y), _op='+') def __mul__(self, y): result = self.data * y.data - return Value(result, (self, y), _op='*') + return Scalar(result, (self, y), _op='*') |