Back Navigation Next Navigation External Packages (page 12 of 38)

The prior examples indexed and sliced a single dimensional array. We can perform these tasks with multi-dimensional arrays as well. The next examples use two-dimensional arrays where we specify the rows and then the columns. For both (all) dimensions, we start with 0 when counting from left to right and with -1 when counting from right to left. Notice how we must specify an index position for both dimensions.

Slicing