Skip to content

Commit fb8cd86

Browse files
authored
Expand example to touch on reshape behavior (#819)
* Expand example to touch on reshape behavior This is necessary for one of the exercises below. Otherwise things could get a bit roundabout. * Update tutorial.rs
1 parent 638eaea commit fb8cd86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/tutorial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ fn TutorialArrays() -> impl IntoView {
490490
<Editor example="↯2_3_4 ⇡24"/>
491491
<p>"Notice there are "<code>"2"</code>" big cells, each with "<code>"3"</code>" rows of "<code>"4"</code>" elements."</p>
492492
<p>"This expands to any number of dimensions. The elements of the last axis are always laid out horizontally. The rows of the second-to-last axis are always laid out vertically. The third-to-last axis is horizontal, the fourth-to-last is vertical, etc."</p>
493-
<p>"We can see here that the shape "<code>"[2 3 4 5]"</code>" appears almost like a 2×3 matrix of 4×5 matrices."</p>
494-
<Editor example="↯2_3_4_5 ⇡120"/>
493+
<p>"We can see here that the shape "<code>"[2 3 4 5]"</code>" appears almost like a 2×3 matrix of 4×5 matrices. Also note that reshape cycles through elements if it doesn't have enough."</p>
494+
<Editor example="↯2_3_4_5 ⇡119"/>
495495

496496
<Hd id="pervasion">"Pervasion"</Hd>
497497
<p>"Most operations that apply to scalars are what is called "<em>"pervasive"</em>" when it comes to arrays. This means that the operation automatically applies to every item in the array."</p>

0 commit comments

Comments
 (0)