summaryrefslogtreecommitdiff
path: root/accessing-pieces-arrays
diff options
context:
space:
mode:
authorPuneeth Chaganti2010-11-01 21:57:12 +0530
committerPuneeth Chaganti2010-11-01 21:57:12 +0530
commit14be7b3f3fb25f63312b9174698df1e6722cdc07 (patch)
treecc2f3aa72ab6af23c973f1c4ae8ad478ec525635 /accessing-pieces-arrays
parent2108ea25e8eff0e81df72bef1574117dad3cf03b (diff)
downloadst-scripts-14be7b3f3fb25f63312b9174698df1e6722cdc07.tar.gz
st-scripts-14be7b3f3fb25f63312b9174698df1e6722cdc07.tar.bz2
st-scripts-14be7b3f3fb25f63312b9174698df1e6722cdc07.zip
Changes to accessing pieces of arrays, based on review.
Diffstat (limited to 'accessing-pieces-arrays')
-rw-r--r--accessing-pieces-arrays/script.rst44
-rw-r--r--accessing-pieces-arrays/slides.org2
2 files changed, 20 insertions, 26 deletions
diff --git a/accessing-pieces-arrays/script.rst b/accessing-pieces-arrays/script.rst
index 5c60750..a1d30f6 100644
--- a/accessing-pieces-arrays/script.rst
+++ b/accessing-pieces-arrays/script.rst
@@ -37,13 +37,14 @@ slicing and striding.
{{{ switch back to the terminal }}}
-.. #[[Anoop: context switch, switch to next slide should be added]]
-
As usual, we start IPython, using
::
ipython -pylab
+
+{{ Show the slide with the arrays, A and C }}
+
Let us have two arrays, A and C, as the sample arrays that we will
use to work through this tutorial.
@@ -70,8 +71,6 @@ To access, the element 34 in A, we say,
A[2]
-.. #[[Anoop: should be A[2], corrected it]]
-
Like lists, indexing starts from 0 in arrays, too. So, 34, the
third element has the index 2.
@@ -134,7 +133,7 @@ column by
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Question 1}}
%%1%% Change the last column of C to zeroes.
@@ -154,7 +153,7 @@ gives the whole of A.
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Question 2}}
%%2%% Change ``A`` to ``[11, 12, 13, 14, 15]``.
@@ -200,11 +199,7 @@ To see that ``I`` is really, just an array, we say,
at the prompt, and see that an array is displayed.
-To check the dimensions of any array, we can use the method
-shape. We say
-
-.. #[[Anoop: method is a function and .shape is a tuple, so it can be named
- as value or something instead of the term method.]]
+To check the dimensions of any array, we can use ``.shape``. We say
::
@@ -242,7 +237,7 @@ columns indexed 0 to 2 (included), we say,
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Question 3 }}
%%3%% First, obtain the elements [22, 23] from C. Then, obtain the
elements [11, 21, 31, 41] from C. Finally, obtain the elements [21,
@@ -250,7 +245,7 @@ elements [11, 21, 31, 41] from C. Finally, obtain the elements [21,
Please, pause the video here. Do the exercises and then continue.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Solution 3 }}
::
@@ -286,13 +281,13 @@ we get the slice from end to end, as we already know.
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Question 4 }}
%%4%% Obtain the elements [[23, 24], [33, -34]] from C.
Please, pause the video here. Do the exercises and then continue.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Solution 4 }}
::
@@ -318,13 +313,13 @@ form of an image and confirm.
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Question 5 }}
%%5%% Obtain the square in the center of the image.
Following is an exercise that you must do.
-.. #[[Anoop: add context switches, switch to next slide]]
+{{ show slide containing Solution 5 }}
::
@@ -359,9 +354,7 @@ of 1 is assumed.
gives the elements, [[21, 23, 0], [41, 43, 0]]
-.. #[[Anoop: I think you forgot to "add switch to next slide" context
- switch, I think it will be better you review the scripts(all) for
- context switches and add them.]]
+{{ show slide containing Question 6 }}
Following is an exercise that you must do.
@@ -371,6 +364,8 @@ Following is an exercise that you must do.
Please, pause the video here. Do the exercises and then continue.
+{{ show slide containing Solution 6 }}
+
::
C[::3, 1::3]
@@ -410,13 +405,12 @@ elements, rows and columns and larger pieces of arrays. We have
also learnt how to modify arrays, element wise or in larger
pieces.
-.. #[[Anoop: I think in the summary slide it is better to use single &
- multi dimensional arrays instead of 1D and Multi dimensional arrays.]]
+{{{ Show the "sponsored by FOSSEE" slide }}}
-.. #[[Anoop: switch to thank you slide, added comment as it most probably
- won't be noticed]]
+This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
-Thank You!
+Hope you have enjoyed and found it useful.
+Thank you!
..
Local Variables:
diff --git a/accessing-pieces-arrays/slides.org b/accessing-pieces-arrays/slides.org
index 5d2ce93..1f33426 100644
--- a/accessing-pieces-arrays/slides.org
+++ b/accessing-pieces-arrays/slides.org
@@ -100,7 +100,7 @@
#+end_src
* Summary
You should now be able to --
- - Manipulate 1D \& Multi dimensional arrays
+ - Manipulate single \& multi dimensional arrays
- Access and change individual elements
- Access and change rows and columns
- Slice and stride on arrays