# HG changeset patch # User Santosh G. Vattam # Date 1256721287 -19800 # Node ID b9748af050c499f014a8459fcd27bb8ea2ac7fe6 # Parent f6725f6bee41561cf0b8ecb9a42f05853ee26388 Updated the session 4, day 1 slides. diff -r f6725f6bee41 -r b9748af050c4 day1/session4.tex --- a/day1/session4.tex Wed Oct 28 14:25:03 2009 +0530 +++ b/day1/session4.tex Wed Oct 28 14:44:47 2009 +0530 @@ -282,8 +282,6 @@ In []: b = matrix([[1], [-2], [0]]) In []: x = linalg.solve(A, b) In []: Ax = dot(A, x) - In []: allclose(Ax, b) - Out[]: True \end{lstlisting} \end{frame} @@ -295,13 +293,31 @@ array([[ 1.], [-2.], [-2.]]) +\end{lstlisting} +\end{frame} +\begin{frame}[fragile] +\frametitle{Let's check!} +\begin{lstlisting} In []: Ax Out[]: matrix([[ 1.00000000e+00], [ -2.00000000e+00], [ 2.22044605e-16]]) \end{lstlisting} +\begin{block}{} +The last term in the matrix is actually \alert{0}!\\ +We can use \kwrd{allclose()} to check. +\end{block} +\begin{lstlisting} +In []: allclose(Ax, b) +Out[]: True +\end{lstlisting} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Exercises} + \end{frame} \section{Summary}