summaryrefslogtreecommitdiff
path: root/day1
diff options
context:
space:
mode:
authorPuneeth Chaganti2009-11-20 00:05:50 +0530
committerPuneeth Chaganti2009-11-20 00:05:50 +0530
commit8b33fcbc1a886583c520152f5137b5f978da502e (patch)
tree88f285a692b3bef9fb04a2be668a6a11c7007d51 /day1
parent7fa050b80598558328217b3b3cde560f99e3a921 (diff)
downloadworkshops-more-scipy-8b33fcbc1a886583c520152f5137b5f978da502e.tar.gz
workshops-more-scipy-8b33fcbc1a886583c520152f5137b5f978da502e.tar.bz2
workshops-more-scipy-8b33fcbc1a886583c520152f5137b5f978da502e.zip
Minor edits to sessions 2, 4, 6 on day1.
Diffstat (limited to 'day1')
-rw-r--r--day1/session2.tex4
-rw-r--r--day1/session4.tex15
-rwxr-xr-xday1/session6.tex2
3 files changed, 15 insertions, 6 deletions
diff --git a/day1/session2.tex b/day1/session2.tex
index 0c3caf8..73637c9 100644
--- a/day1/session2.tex
+++ b/day1/session2.tex
@@ -331,7 +331,7 @@ This gives \kwrd{tsq} which is the list of squares of \typ{t} values.
\frametitle{What about larger data sets?}
\alert{Data is usually present in a file!} \\
Lets look at the \typ{pendulum.txt} file.
-\begin{lstlisting}
+\begin{lstlisting}
$ cat pendulum.txt
1.0000e-01 6.9004e-01
1.1000e-01 6.9497e-01
@@ -339,7 +339,7 @@ $ cat pendulum.txt
1.3000e-01 7.5360e-01
1.4000e-01 8.3568e-01
1.5000e-01 8.6789e-01
-\end{lstlisting}
+\end{lstlisting} %$
\ldots
\begin{block}{Windows users:}
C:> type pendulum.txt
diff --git a/day1/session4.tex b/day1/session4.tex
index a72ae60..3cff99c 100644
--- a/day1/session4.tex
+++ b/day1/session4.tex
@@ -156,8 +156,8 @@ array([[ 1., 1., 1., 1., 1.],
[ 1., 1., 1., 1., 1.],
[ 1., 1., 1., 1., 1.]])
-In []: ones_like([1, 2, 3, 4, 5])
-Out[]: array([1, 1, 1, 1, 1])
+In []: ones_like([1, 2, 3, 4])
+Out[]: array([1, 1, 1, 1])
In []: identity(2)
Out[]:
@@ -515,6 +515,15 @@ In []: for line in open('pendulum.txt'):
....
\end{lstlisting}
\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Getting $L$ and $T^2$ \dots}
+\begin{lstlisting}
+In []: l = array(l)
+In []: t = array(t)
+\end{lstlisting}
+\alert{\typ{In []: tsq = t*t}}
+\end{frame}
\begin{frame}[fragile]
\frametitle{Generating $A$}
@@ -538,7 +547,7 @@ In []: A = A.T
\item Along with a lot of things, it returns the least squares solution
\end{itemize}
\begin{lstlisting}
-In []: result = lstsq(A,TSq)
+In []: result = lstsq(A,tsq)
In []: coef = result[0]
\end{lstlisting}
\end{frame}
diff --git a/day1/session6.tex b/day1/session6.tex
index acfc687..0f1523e 100755
--- a/day1/session6.tex
+++ b/day1/session6.tex
@@ -328,7 +328,7 @@ In []: def epid(y, t):
\begin{frame}[fragile]
\frametitle{Solving ODEs using SciPy \ldots}
\begin{lstlisting}
-In []: t = arange(0, 12, 0.2)
+In []: t = linspace(0, 12, 61)
In []: y = odeint(epid, 250, t)