Skip to content

Commit 990e1c1

Browse files
committed
Drop some text in favor of a code comment.
1 parent e519e60 commit 990e1c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

content/tutorial-svd.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,10 @@ img_array.shape
274274
```
275275

276276
so we need to permutate the axis on this array to get a shape like `(3, 768, 1024)`. Fortunately, the [numpy.transpose](https://numpy.org/devdocs/reference/generated/numpy.transpose.html#numpy.transpose) function can do that for us:
277-
```
278-
np.transpose(x, axes=(i, j, k))
279-
```
280-
indicates that the axis will be reordered such that the final shape of the transposed array will be reordered according to the indices `(i, j, k)`.
281-
282-
Let's see how this goes for our array:
283277

284278
```{code-cell}
279+
# The values in the tuple indicate the original dim, and the order the new axis
280+
# so axis 2 -> 0, 0 -> 1, and 1 -> 2
285281
img_array_transposed = np.transpose(img_array, (2, 0, 1))
286282
img_array_transposed.shape
287283
```

0 commit comments

Comments
 (0)