Tensor.numpy()
Used to convert a tensor to a numpy array.
Remember the numpy array is in CPU.
Usage
from tinygrad.tensor import Tensor
tensor = Tensor([1, 2, 3])
# Convert to numpy array
numpy_array = tensor.numpy()
# Print output
print(numpy_array)
Return Value
[1., 2., 3.]