Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions site/src/tutorial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ fn TutorialArrays() -> impl IntoView {
<Editor example="↯2_3_4 ⇡24"/>
<p>"Notice there are "<code>"2"</code>" big cells, each with "<code>"3"</code>" rows of "<code>"4"</code>" elements."</p>
<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>
<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>
<Editor example="↯2_3_4_5 ⇡120"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like this original example to be preserved. It shows how elements are laid out in order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous example (↯2_3_4 ⇡24) also shows that I think. The only difference here is that the shape is rank 4.

But OK. How about it like this? It would keep most of the original while also illustrating cycling.

<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>
<Editor example="↯2_3_4_5 ⇡119"/>

<Hd id="pervasion">"Pervasion"</Hd>
<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>
Expand Down