make the example simpler

This commit is contained in:
George Hotz
2020-10-26 09:19:20 -07:00
parent 1f0514e5df
commit 43591a1e71
3 changed files with 9 additions and 4 deletions

View File

@@ -15,11 +15,10 @@ The Tensor class is a wrapper around a numpy array, except it does Tensor things
### Example
```python
import numpy as np
from tinygrad.tensor import Tensor
x = Tensor(np.eye(3))
y = Tensor(np.array([[2.0,0,-2.0]]))
x = Tensor.eye(3)
y = Tensor([[2.0,0,-2.0]])
z = y.dot(x).sum()
z.backward()