day1/session4.tex
changeset 373 f04eca8b2f3d
parent 366 ec4cb3ba7f09
child 378 2299700a8b97
equal deleted inserted replaced
372:5f02dfb93df1 373:f04eca8b2f3d
    77 \title[Matrices \& Curve Fitting]{Python for Science and Engg: Matrices \& Least Square Fit}
    77 \title[Matrices \& Curve Fitting]{Python for Science and Engg: Matrices \& Least Square Fit}
    78 
    78 
    79 \author[FOSSEE] {FOSSEE}
    79 \author[FOSSEE] {FOSSEE}
    80 
    80 
    81 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    81 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    82 \date[] {28 January, 2010\\Day 1, Session 4}
    82 \date[] {13 February, 2010\\Day 2, Session 1}
    83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    84 
    84 
    85 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    85 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    86 %\logo{\pgfuseimage{iitmlogo}}
    86 %\logo{\pgfuseimage{iitmlogo}}
    87 
    87 
   274 Out[]: 
   274 Out[]: 
   275 array([[11, 13],
   275 array([[11, 13],
   276        [31, 33]])
   276        [31, 33]])
   277   \end{lstlisting}
   277   \end{lstlisting}
   278   \end{small}
   278   \end{small}
       
   279 \end{frame}
       
   280 
       
   281 \begin{frame}[fragile]
       
   282   \frametitle{Shape of a matrix}
       
   283   \begin{lstlisting}
       
   284 In []: c
       
   285 Out[]: 
       
   286 array([[11, 12, 13],
       
   287        [ 0,  0,  0],
       
   288        [31, 32, 33]])
       
   289 
       
   290 In []: c.shape
       
   291 Out[]: (3, 3)
       
   292   \end{lstlisting}
       
   293 \emphbar{Shape specifies shape or dimensions of a matrix}
   279 \end{frame}
   294 \end{frame}
   280 
   295 
   281 \begin{frame}[fragile]
   296 \begin{frame}[fragile]
   282   \frametitle{Slicing \& Striding Exercises}
   297   \frametitle{Slicing \& Striding Exercises}
   283 \begin{small}
   298 \begin{small}
   516 \end{itemize}
   531 \end{itemize}
   517 \end{frame}
   532 \end{frame}
   518 
   533 
   519 \begin{frame}[fragile]
   534 \begin{frame}[fragile]
   520 \frametitle{Getting $L$ and $T^2$}
   535 \frametitle{Getting $L$ and $T^2$}
   521 If you \alert{closed} IPython after session 2
   536 %If you \alert{closed} IPython after session 2
   522 \begin{lstlisting}
   537 \begin{lstlisting}
   523 In []: l = []
   538 In []: l = []
   524 In []: t = []
   539 In []: t = []
   525 In []: for line in open('pendulum.txt'):
   540 In []: for line in open('pendulum.txt'):
   526   ....     point = line.split()
   541   ....     point = line.split()