summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--day2/session2.tex8
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