changeset 398 | 36295bb91766 |
397:4aea9ed09983 | 398:36295bb91766 |
---|---|
1 Creating an array:\\ |
|
2 {\ex \lstinline| a = array([[1,2,3,4],[5,6,7,8]])|} |
|
3 |
|
4 Finding shape of array:\\ |
|
5 {\ex \lstinline| a.shape|} |
|
6 |
|
7 Reshape an array:\\ |
|
8 {\ex \lstinline| a.reshape(4,2)|} |
|
9 |
|
10 Creating identity matrix:\\ |
|
11 {\ex \lstinline| identity(3)|} |
|
12 |
|
13 Creating matrix with all zeros:\\ |
|
14 {\ex \lstinline| z = zeros((4,2))|} |