Skip to content

Instantly share code, notes, and snippets.

@miltonlab
Last active August 29, 2015 14:20
Show Gist options
  • Save miltonlab/87bc95c5445980f8ddeb to your computer and use it in GitHub Desktop.
Save miltonlab/87bc95c5445980f8ddeb to your computer and use it in GitHub Desktop.
Matrices
from numpy import array
a = array([[5.1, 7.4, 3.2, 9.9],
[1.9, 6.8, 4.1, 2.3],
[2.9, 6.4, 4.3, 1.4]])
#cantidad de elemtos
a.size
#dimensiones
a.shape
#Lectura: Obtener un elemento contenido en la matriz
a[1, 3]
#Escritura / Modificacion
a[2,2] = 8.8
#Presentacion
print(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment