From 5f7dd746557bff06192e588fa6d64d48e20b2183 Mon Sep 17 00:00:00 2001 From: chenyu Date: Fri, 14 Jun 2024 23:12:41 -0400 Subject: [PATCH] docs: update wording for unflatten (#4974) it was using `Expands`, the same in torch doc, but we also have expand so it's confusing --- tinygrad/tensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/tensor.py b/tinygrad/tensor.py index acd581abb3..6f73581a82 100644 --- a/tinygrad/tensor.py +++ b/tinygrad/tensor.py @@ -1228,7 +1228,7 @@ class Tensor: def unflatten(self, dim:int, sizes:Tuple[int,...]): """ - Expands dimension `dim` of the tensor over multiple dimensions specified by `sizes`. + Unflattens dimension `dim` of the tensor into multiple dimensions specified by `sizes`. `Tensor.flatten()` is the inverse of this function. ```python exec="true" source="above" session="tensor" result="python" print(Tensor.ones(3, 4, 1).unflatten(1, (2, 2)).shape)