day1/cheatsheet4.tex
changeset 343 adb85e126341
parent 341 7ae88b9da553
equal deleted inserted replaced
342:f91a75802238 343:adb85e126341
   134 \typ{C[startR:stopR:stepR,startC:stopC:stepC]} => Syntax of mentioning starting index, ending index, and step to jump.\\
   134 \typ{C[startR:stopR:stepR,startC:stopC:stepC]} => Syntax of mentioning starting index, ending index, and step to jump.\\
   135 In above mentioned case, \typ{'::2'} means, start from first row, till last row(both are blank), with step of 2, that is, skipping alternate row. After first row, C[startR], next row would be C[startR+stepR] and so on.
   135 In above mentioned case, \typ{'::2'} means, start from first row, till last row(both are blank), with step of 2, that is, skipping alternate row. After first row, C[startR], next row would be C[startR+stepR] and so on.
   136 \begin{lstlisting}
   136 \begin{lstlisting}
   137 In []: C[:,::2]
   137 In []: C[:,::2]
   138 Out[]: 
   138 Out[]: 
   139 xarray([[ 1,  2],
   139 array([[ 1,  2],
   140        [ 0,  0],
   140        [ 0,  0],
   141        [-1,  7]])
   141        [-1,  7]])
   142 \end{lstlisting}
   142 \end{lstlisting}
   143 Same as above, just that here we get matrix with each alternate column and all rows.
   143 Same as above, just that here we get matrix with each alternate column and all rows.
   144 \begin{lstlisting}
   144 \begin{lstlisting}