diff options
author | Amit Sethi | 2010-11-08 01:56:03 +0530 |
---|---|---|
committer | Amit Sethi | 2010-11-08 01:56:03 +0530 |
commit | bf83e16caf164cdbcb3ddd72f44833109b989b97 (patch) | |
tree | d2d14c96af50041aa9cc29d8c3595aa8bcb16d3e /accessing-pieces-arrays/script.rst | |
parent | e09d107f6a3c7ddd290e4390158f682c1ca2b0b4 (diff) | |
parent | 1535316de3744cb31b7f1eaa5006f30a15d0f31c (diff) | |
download | st-scripts-bf83e16caf164cdbcb3ddd72f44833109b989b97.tar.gz st-scripts-bf83e16caf164cdbcb3ddd72f44833109b989b97.tar.bz2 st-scripts-bf83e16caf164cdbcb3ddd72f44833109b989b97.zip |
Merging changes
Diffstat (limited to 'accessing-pieces-arrays/script.rst')
-rw-r--r-- | accessing-pieces-arrays/script.rst | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/accessing-pieces-arrays/script.rst b/accessing-pieces-arrays/script.rst index 1c7b9b3..b6567a4 100644 --- a/accessing-pieces-arrays/script.rst +++ b/accessing-pieces-arrays/script.rst @@ -16,11 +16,12 @@ .. 1. getting started with arrays - +.. #[anand: internal reviewer not mentioned] .. Author : Puneeth Internal Reviewer : External Reviewer : - Checklist OK? : <put date stamp here, if OK> [2010-10-05] + Language Reviewer : Bhanukiran + Checklist OK? : <06-11-2010, Anand, OK> [2010-10-05] Script ------ @@ -126,12 +127,11 @@ or C[-1] = 0 -Now, how do we access one column of C? As with accessing -individual elements, the column is the second parameter to be -specified (after the comma). The first parameter, is now replaced -with a ``:`` to say, that we want all the elements of that -dimension, instead of one particular element. We access the third -column by +Now, how do we access one column of C? As with accessing individual +elements, the column is the second parameter to be specified (after +the comma). The first parameter, is replaced with a ``:``. This +specifies that we want all the elements of that dimension, instead of +just one particular element. We access the third column by :: @@ -230,7 +230,7 @@ We say, to get the elements of rows indexed from 0 to 3, 3 not included and column indexed 2. Note that, the index before the colon is -included and the index after it is not included, in the slice that +included and the index after it is not included in the slice that we have obtained. This is very similar to the ``range`` function, where ``range`` returns a list, in which the upper limit or stop value is not included. @@ -269,11 +269,10 @@ gives the elements [11, 21, 31, 41] gives the elements [21, 31, 41, 0] -Note that when specifying ranges, if you are starting from or -going up-to the end, the corresponding element may be dropped. So, -in the previous example to obtain [11, 21, 31, 41], we could have -simply said, -:: +Note that when specifying ranges, if you are starting from the +beginning or going up-to the end, the corresponding element may be +dropped. So, in the previous example to obtain [11, 21, 31, 41], we +could have simply said, :: C[:4, 0] @@ -323,7 +322,7 @@ Following is an exercise that you must do. %%5%% Obtain the square in the center of the image. -Following is an exercise that you must do. +Please, pause the video here. Do the exercises and then continue. {{ show slide containing Solution 5 }} @@ -383,7 +382,7 @@ gives the elements [[12, 0], [42, 0]] gives the elements [[12, 13, 14], [0, 0, 0]] -Now, that we know how to stride over an image, we can drop +Now, that we know how to stride over an array, we can drop alternate rows and columns out of the image in I. :: @@ -423,5 +422,5 @@ Thank you! mode: rst indent-tabs-mode: nil sentence-end-double-space: nil - fill-column: 75 + fill-column: 70 End: |