diff options
author | Puneeth Chaganti | 2011-06-15 11:55:10 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2011-06-15 11:55:10 +0530 |
commit | 93009372b4e0c2920ceec5c6f0c7821b206e6fb0 (patch) | |
tree | 060f5dcb3d7e37c16571927b3d2c1770c3278056 | |
parent | 82ba7af933b7e2fc3503472aa09074f5649c463c (diff) | |
download | sees-93009372b4e0c2920ceec5c6f0c7821b206e6fb0.tar.gz sees-93009372b4e0c2920ceec5c6f0c7821b206e6fb0.tar.bz2 sees-93009372b4e0c2920ceec5c6f0c7821b206e6fb0.zip |
adv_py: Minor fixes to slides.
-rw-r--r-- | advanced_python/slides/arrays.tex | 2 | ||||
-rw-r--r-- | advanced_python/slides/modules.tex | 2 | ||||
-rw-r--r-- | advanced_python/slides/plotting.tex | 11 | ||||
-rw-r--r-- | advanced_python/slides/scipy.tex | 7 |
4 files changed, 12 insertions, 10 deletions
diff --git a/advanced_python/slides/arrays.tex b/advanced_python/slides/arrays.tex index 38107a4..7b829f9 100644 --- a/advanced_python/slides/arrays.tex +++ b/advanced_python/slides/arrays.tex @@ -48,7 +48,7 @@ \item array of shape (4, 5) with all 0s \end{itemize} \begin{lstlisting} - a = zeros_like([1.5, 1, 2, 3] + a = zeros_like([1.5, 1, 2, 3]) print a, a.dtype \end{lstlisting} \begin{itemize} diff --git a/advanced_python/slides/modules.tex b/advanced_python/slides/modules.tex index ecc5ce8..957789a 100644 --- a/advanced_python/slides/modules.tex +++ b/advanced_python/slides/modules.tex @@ -100,7 +100,7 @@ \frametitle{GCD script} \begin{itemize} \item Function that computes gcd of two numbers - \item Save it as \texttt{gcd\_scrip.py} + \item Save it as \texttt{gcd\_script.py} \end{itemize} \begin{lstlisting} def gcd(a, b): diff --git a/advanced_python/slides/plotting.tex b/advanced_python/slides/plotting.tex index e507994..b8b4bce 100644 --- a/advanced_python/slides/plotting.tex +++ b/advanced_python/slides/plotting.tex @@ -226,9 +226,8 @@ \item \texttt{loc} parameter allows to change the location \end{itemize} \begin{lstlisting} - legend(['sine-10 points', 'sine-500 points'], loc='center') - - loc? + legend(['sine-10 points', 'sine-500 points'], + loc='center') \end{lstlisting} \end{frame} @@ -346,7 +345,8 @@ loadtxt('pendulum_error.txt', unpack=True) Tsq = square(T) - errorbar(L, Tsq , xerr=L_err, yerr=T_err, fmt='b.') + errorbar(L, Tsq , xerr=L_err, + yerr=T_err, fmt='b.') \end{lstlisting} \end{frame} @@ -361,7 +361,8 @@ \item Let's plot the data of profits of a company \end{itemize} \begin{lstlisting} - year, profit = loadtxt('company-a-data.txt', dtype=type(int())) + year, profit = loadtxt('company-a-data.txt', + dtype=type(int())) scatter(year, profit) \end{lstlisting} diff --git a/advanced_python/slides/scipy.tex b/advanced_python/slides/scipy.tex index afd98d4..1116c3d 100644 --- a/advanced_python/slides/scipy.tex +++ b/advanced_python/slides/scipy.tex @@ -42,7 +42,8 @@ Out[]: array([ 1., -2., -2.]) \begin{lstlisting} In []: Ax = dot(A, x) In []: Ax -Out[]: array([ 1.00000000e+00, -2.00000000e+00, -1.11022302e-16]) +Out[]: array([ 1.00000000e+00, -2.00000000e+00, + -1.11022302e-16]) \end{lstlisting} \end{small} \begin{block}{} @@ -90,7 +91,6 @@ Out[]: True \frametitle{\texttt{fsolve} \ldots} Find the root of $sin(z)+cos^2(z)$ nearest to $0$ \begin{lstlisting} -\begin{lstlisting} In []: def g(z): ....: return sin(z)+cos(z)*cos(z) @@ -192,9 +192,10 @@ In []: initial = [10*2*pi/360, 0] \begin{frame}[fragile] \frametitle{ODEs - Simple Pendulum \ldots} %%\begin{small} -\texttt{In []: from scipy.integrate import odeint} +\texttt{} %%\end{small} \begin{lstlisting} +In []: from scipy.integrate import odeint In []: pend_sol = odeint(pend_int, initial,t) \end{lstlisting} |