day1/cheatsheet4.tex
changeset 341 7ae88b9da553
parent 340 347ff2714deb
parent 330 46533051b9d3
child 343 adb85e126341
equal deleted inserted replaced
340:347ff2714deb 341:7ae88b9da553
    36 Out[]: (3, 2)
    36 Out[]: (3, 2)
    37 \end{lstlisting}
    37 \end{lstlisting}
    38 \typ{In []: B = ones_like(C)} \\
    38 \typ{In []: B = ones_like(C)} \\
    39 B would be array of ones with the same shape and type as C.\\
    39 B would be array of ones with the same shape and type as C.\\
    40 \typ{In []: A = ones((3,2))} \\
    40 \typ{In []: A = ones((3,2))} \\
    41 A would be new array of given shape(arguments), filled with ones.\\ 
    41 A would be new matrix of given shape(arguments), filled with ones.\\ 
    42 \typ{In []: I = identity(3)}\\
    42 \typ{In []: I = identity(3)}\\
    43 I would be identity matrix of shape 3x3
    43 I would be identity matrix of shape 3x3
    44 
    44 
    45 \subsection{Accessing Elements}
    45 \subsection{Accessing Elements}
    46 \begin{lstlisting}
    46 \begin{lstlisting}