summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShantanu2009-10-31 01:33:41 +0530
committerShantanu2009-10-31 01:33:41 +0530
commitb29072301bebcdeee11e5dec132583961825aa15 (patch)
tree509a6c806ed2341bd9d7c532e00d849ed64a2c74
parentd55d50cdba2ec3288c47de8b35119dd84f382948 (diff)
parent12149108dd76ae904bcb935736fa89867020b4c3 (diff)
downloadworkshops-more-scipy-b29072301bebcdeee11e5dec132583961825aa15.tar.gz
workshops-more-scipy-b29072301bebcdeee11e5dec132583961825aa15.tar.bz2
workshops-more-scipy-b29072301bebcdeee11e5dec132583961825aa15.zip
Merged all branches.
-rw-r--r--day1/session5.tex12
1 files changed, 4 insertions, 8 deletions
diff --git a/day1/session5.tex b/day1/session5.tex
index 46dcd54..24b1282 100644
--- a/day1/session5.tex
+++ b/day1/session5.tex
@@ -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 @@ In []: T = data[:,1]
%% \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}