Difference between revisions of "Comandos útiles de Python y BASH"
From hpcwiki
Gvillalobos (Talk | contribs) (→Python) |
Gvillalobos (Talk | contribs) (→Python) |
||
Line 5: | Line 5: | ||
<code> A = np.matrix("1.,2;3,4;5,6") </code> | <code> A = np.matrix("1.,2;3,4;5,6") </code> | ||
+ | |||
+ | utilizando la clase np.matrix: | ||
+ | |||
+ | <code> A = np.matrix([1,2],[2,3],[3,4]] </code>. |
Revision as of 17:27, 15 April 2014
Python
Es posible introducir un arreglo en numpy usando la sintaxis the matlab:
A = np.matrix("1.,2;3,4;5,6")
utilizando la clase np.matrix:
A = np.matrix([1,2],[2,3],[3,4]]
.