diff options
author | Puneeth Chaganti | 2009-10-09 12:26:47 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2009-10-09 12:26:47 +0530 |
commit | 48d61aa98995661b7a4cc61b347a08b32af8d57c (patch) | |
tree | 909155dc41e9c6dbb0417fe18d082d9f7ec3ace5 | |
parent | a84515c6184cbc6231c5473f8985670805d747af (diff) | |
download | workshops-48d61aa98995661b7a4cc61b347a08b32af8d57c.tar.gz workshops-48d61aa98995661b7a4cc61b347a08b32af8d57c.tar.bz2 workshops-48d61aa98995661b7a4cc61b347a08b32af8d57c.zip |
Minor edits to Copies and Views.
-rw-r--r-- | day2/session2.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/day2/session2.tex b/day2/session2.tex index 3f0184d..f93b02f 100644 --- a/day2/session2.tex +++ b/day2/session2.tex @@ -150,7 +150,7 @@ \includegraphics[height=0.7in, interpolate=true]{data/broadcast_scalar} \end{columns} \begin{itemize} - \item Allows functions to take inputs not of the same shape + \item Allows functions to take inputs that are not of the same shape \item 2 rules - \begin{enumerate} \item 1 is (repeatedly) prepended to shapes of smaller arrays @@ -177,8 +177,9 @@ \begin{frame}[fragile] \frametitle{Copies \& Views} Try it! + \vspace{-0.1in} \begin{lstlisting} - >>> a = np.array([[1,2,3],[4,5,6]]) + >>> a = np.arange(1,9); a.shape=3,3 >>> b = a >>> b is a >>> b[0,0]=0; print a @@ -195,9 +196,8 @@ \begin{frame}[fragile] \frametitle{Copies \& Views} Try it! + \vspace{-0.1in} \begin{lstlisting} - >>> a = np.arange(1,9) - >>> a.shape=3,3 >>> b = a[0,1:3] >>> c = a[0::2,0::2] >>> a.flags.owndata |