Merged all branches.
authorShantanu <shantanu@fossee.in>
Sat, 31 Oct 2009 01:33:41 +0530
changeset 262 9664eddee075
parent 261 9cce24d00957 (current diff)
parent 260 1f5fea506927 (diff)
child 263 8a4a1e5aec85
Merged all branches.
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}