diff options
author | Shantanu Choudhary | 2009-10-31 01:33:41 +0530 |
---|---|---|
committer | Shantanu Choudhary | 2009-10-31 01:33:41 +0530 |
commit | fff08abf9ea34a713d7dfc6b38a0ac7dc6711fc3 (patch) | |
tree | 509a6c806ed2341bd9d7c532e00d849ed64a2c74 /day1 | |
parent | cb18959fe1554c4cd8bcc2af160c14af5010f70a (diff) | |
parent | 7dcedb4dc7aaa411877d6108bc0220bd41293315 (diff) | |
download | workshops-fff08abf9ea34a713d7dfc6b38a0ac7dc6711fc3.tar.gz workshops-fff08abf9ea34a713d7dfc6b38a0ac7dc6711fc3.tar.bz2 workshops-fff08abf9ea34a713d7dfc6b38a0ac7dc6711fc3.zip |
Merged all branches.
Diffstat (limited to 'day1')
-rw-r--r-- | day1/session5.tex | 12 |
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} |