This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
python_getting_started [2013/08/14 11:34] asa |
python_getting_started [2013/08/14 11:35] asa |
||
---|---|---|---|
Line 254: | Line 254: | ||
Elements and sub-matrices are easily extracted: | Elements and sub-matrices are easily extracted: | ||
- | <code> | + | <code python> |
In [25]: b | In [25]: b | ||
Out[25]: | Out[25]: | ||
Line 274: | Line 274: | ||
Let's multiply the first row of a $a$ by the second column of $b$. | Let's multiply the first row of a $a$ by the second column of $b$. | ||
- | <code> | + | <code python> |
In [29]: np.dot(a[0], b[:,1]) | In [29]: np.dot(a[0], b[:,1]) | ||
Out[29]: 30.0 | Out[29]: 30.0 |