diff options
Diffstat (limited to 'day1')
-rwxr-xr-x | day1/cheatsheet1.tex | 4 | ||||
-rwxr-xr-x | day1/cheatsheet2.tex | 4 | ||||
-rwxr-xr-x | day1/cheatsheet4.tex | 8 | ||||
-rw-r--r-- | day1/cheatsheet5.tex | 2 | ||||
-rwxr-xr-x | day1/cheatsheet6.tex | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/day1/cheatsheet1.tex b/day1/cheatsheet1.tex index 29aa60f..a5f59e1 100755 --- a/day1/cheatsheet1.tex +++ b/day1/cheatsheet1.tex @@ -44,7 +44,7 @@ Do you really want to exit ([y]/n)? y \subsection{plot} \typ{In []: plot(X, Y)}\\ -For given arrays of equal length(above case X and Y), \typ{plot} plots the correspoding *x* and *y* pairs taken from X and Y. +For given arrays of equal length(above case X and Y), \typ{plot} plots the corresponding *x* and *y* pairs taken from X and Y. \subsection{Colors of plots} \typ{In []: plot(y, sin(y), 'g')}\\ @@ -78,7 +78,7 @@ Same way one can have TeX expression on xlabel, ylabel etc. \subsection{legends} \typ{In []: legend('sin(x)',loc=center)} \\ -Placec a legend on the current plot at location *loc*.\\ +Places a legend on the current plot at location *loc*.\\ Apart from \typ{center}, some other \typ{loc} which can be specified are: \begin{lstlisting} 'best' diff --git a/day1/cheatsheet2.tex b/day1/cheatsheet2.tex index 0b61e7c..58076f6 100755 --- a/day1/cheatsheet2.tex +++ b/day1/cheatsheet2.tex @@ -119,11 +119,11 @@ In []: print greet.split() Out[]: ['hello', 'world'] In []: greet = ``hello, world'' In []: print greet.split(',') -Out[]: ['hello', ' world'] # Note the whitespace before 'world' +Out[]: ['hello', ' world'] # Note the white space before 'world' \end{lstlisting} A string can be split based on the delimiter specified within quotes. A combination of more than one delimiter can also be used.\\ \typ{In []: greet.split(', ')}\\ -\typ{Out[]: ['hello', 'world']}\\Note the whitespace is not there anymore. +\typ{Out[]: ['hello', 'world']}\\Note the white space is not there anymore. \newpage \section{Plotting from Files} \subsection{Opening files} diff --git a/day1/cheatsheet4.tex b/day1/cheatsheet4.tex index d04609a..68257a8 100755 --- a/day1/cheatsheet4.tex +++ b/day1/cheatsheet4.tex @@ -28,7 +28,7 @@ Matrix Creation\\ \typ{In []: C = array([[1,1,2], [2,4,1], [-1,3,7]])}\\ It creates C matrix of shape 3x3\\ -Shape is dimenions of given array. +Shape is dimensions of given array. \begin{lstlisting} In []: C.shape Out[]: (3, 3) @@ -52,7 +52,7 @@ array([[ 1, 1, 2], In []: C[1,2] Out[]: 1 \end{lstlisting} -Two indexes seperated by \typ{','} specifies [row, column]. So \typ{C[1,2]} gets third element of second row(indices starts from 0). +Two indexes separated by \typ{','} specifies [row, column]. So \typ{C[1,2]} gets third element of second row(indices starts from 0). \newpage \begin{lstlisting} In []: C[1] @@ -77,7 +77,7 @@ array([[ 1, 1, 2], \end{lstlisting} \subsection{Slicing} -Accessing rows with Matricies is straightforward. But If one wants to access particular Column, or want a sub-matrix, Slicing is the way to go. +Accessing rows with Matrices is straightforward. But If one wants to access particular Column, or want a sub-matrix, Slicing is the way to go. \begin{lstlisting} In []: C[:,1] Out[]: array([1, 0, 3]) @@ -123,7 +123,7 @@ array([[ 0, 0], \typ{':2'} => Start from first column, till and excluding third column. \newpage \subsection{Striding} -Often apart from submatrix, one needs to get some mechanism to jump a step. For example, how can we have all alternate rows of a Matrix. \\ +Often apart from sub-matrix, one needs to get some mechanism to jump a step. For example, how can we have all alternate rows of a Matrix. \\ Following method will return Matrix with alternate rows. \begin{lstlisting} In []: C[::2,:] diff --git a/day1/cheatsheet5.tex b/day1/cheatsheet5.tex index 0a0f600..cf9b405 100644 --- a/day1/cheatsheet5.tex +++ b/day1/cheatsheet5.tex @@ -15,7 +15,7 @@ In [2]: x, y = loadtxt('points.txt', unpack = True) #load data file directly into Arrays. \end{verbatim} \section{} -Interploate +Interpolate \begin{verbatim} In []: from scipy.interpolate import splrep In []: tck = splrep(x,y) #get spline curve representation for x,y. diff --git a/day1/cheatsheet6.tex b/day1/cheatsheet6.tex index 5dacecc..5d3cfdf 100755 --- a/day1/cheatsheet6.tex +++ b/day1/cheatsheet6.tex @@ -24,7 +24,7 @@ showstringspaces=false, \large{FOSSEE} \end{center} \section{Solving linear equations} -Condier following sets of equations:\\ +Consider following sets of equations:\\ \begin{align*} 3x + 2y - z & = 1 \\ 2x - 2y + 4z & = -2 \\ @@ -82,7 +82,7 @@ Out[95]: 1.5707963267948966 In [96]: expression(pi/3) Out[96]: 0.90689968211710881 \end{lstlisting} -\subsection{Roots of non-linear eqations} +\subsection{Roots of non-linear equations} For Finding the roots of a non linear equation(defined as $f(x)=0$), around a starting estimate we use \typ{fsolve}:\\ \typ{In []: from scipy.optimize import fsolve}\\ \typ{fsolve} is not a part of \typ{pylab}, instead is a function in the \textbf{optimize} module of \textbf{scipy}, and hence we \textbf{import} it.\\ |