We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5c005d0 + 97ed981 commit 3f098d9Copy full SHA for 3f098d9
1 file changed
minitorch/scalar.py
@@ -45,7 +45,7 @@ class Scalar(Variable):
45
46
def __init__(self, v, back=History(), name=None):
47
super().__init__(back, name=name)
48
- self.data = v
+ self.data = float(v)
49
50
def __repr__(self):
51
return "Scalar(%f)" % self.data
0 commit comments