# HG changeset patch # User Shantanu # Date 1256933021 -19800 # Node ID 9664eddee075c65a90635c33cda671fdb0a7919e # Parent 9cce24d009577720865e5afd552f53a7ee40e73f# Parent 1f5fea506927f30b9e9b77e61f20f1075973d1aa Merged all branches. 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}