blob: 10714c4ba4aa7e1084d98e1f7861581e6a9e4f3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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))|}
|