getting-started-with-arrays/quickref.tex
author anand
Mon, 15 Nov 2010 14:54:10 +0530
changeset 502 8ca74cb15807
parent 398 36295bb91766
permissions -rw-r--r--
checklist not ok; 5 short answer questions and 2 long answer questions are to be included.

Creating an array:\\
{\ex \lstinline|    a = array([[1,2,3,4],[5,6,7,8]])|}

Finding shape of array:\\
{\ex \lstinline|    a.shape|}

Reshape an array:\\
{\ex \lstinline|    a.reshape(4,2)|}

Creating identity matrix:\\
{\ex \lstinline|    identity(3)|}

Creating matrix with all zeros:\\
{\ex \lstinline|    z = zeros((4,2))|}