day1/session4.tex
changeset 330 46533051b9d3
parent 319 cef948318842
child 337 56aa2efbf7d9
equal deleted inserted replaced
329:0a6ab1d81491 330:46533051b9d3
    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[] {7 November, 2009\\Day 1, Session 4}
    82 \date[] {14 December, 2009\\Day 1, Session 4}
    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 
   285 In []: a = imread('lena.png')
   285 In []: a = imread('lena.png')
   286 
   286 
   287 In []: imshow(a)
   287 In []: imshow(a)
   288 Out[]: <matplotlib.image.AxesImage object at 0xa0384cc>
   288 Out[]: <matplotlib.image.AxesImage object at 0xa0384cc>
   289 
   289 
   290 In []: a.shape 
       
   291 Out[]: (512, 512, 4)
       
   292   \end{lstlisting}
   290   \end{lstlisting}
   293 \end{small}
   291 \end{small}
   294   \begin{itemize}
   292   \begin{itemize}
   295   \item Crop the image to get the top-left quarter
   293   \item Crop the image to get the top-left quarter
   296   \item Crop the image to get only the face
   294   \item Crop the image to get only the face
   315 \end{frame}
   313 \end{frame}
   316 
   314 
   317 \begin{frame}[fragile]
   315 \begin{frame}[fragile]
   318 \frametitle{Transpose of a Matrix}
   316 \frametitle{Transpose of a Matrix}
   319 \begin{lstlisting}
   317 \begin{lstlisting}
       
   318 In []: a = array([[ 1,  1,  2, -1],
       
   319   ...:            [ 2,  5, -1, -9],
       
   320   ...:            [ 2,  1, -1,  3],
       
   321   ...:            [ 1, -3,  2,  7]])
       
   322 
   320 In []: a.T
   323 In []: a.T
   321 Out[]:
   324 Out[]:
   322 array([[ 1,  2,  2,  1],
   325 array([[ 1,  2,  2,  1],
   323        [ 1,  5,  1, -3],
   326        [ 1,  5,  1, -3],
   324        [ 2, -1, -1,  2],
   327        [ 2, -1, -1,  2],