diff -r 9cce24d00957 -r 9664eddee075 day1/session5.tex --- a/day1/session5.tex Sat Oct 31 01:33:12 2009 +0530 +++ b/day1/session5.tex Sat Oct 31 01:33:41 2009 +0530 @@ -134,9 +134,8 @@ \item Each row must have same number of values. \end{itemize} \begin{lstlisting} -In []: data = loadtxt('pendulum.txt') -In []: L = data[:,0] -In []: T = data[:,1] +In []: L, T = loadtxt('pendulum.txt', + unpack = True) \end{lstlisting} \end{frame} @@ -154,11 +153,8 @@ %% \item Interpolate the missing region. \end{itemize} \begin{lstlisting} -In []: data = loadtxt('points.txt') -In []: data.shape -Out[]: (40, 2) -In []: x = data[:,0] -In []: y = data[:,1] +In []: x, y = loadtxt('points.txt', + unpack = True) In []: plot(x, y, '.') \end{lstlisting} \end{frame}