Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created February 15, 2018 00:10
Show Gist options
  • Save Fhernd/4db31692421e1a19d62cd69bf4d96bcd to your computer and use it in GitHub Desktop.
Save Fhernd/4db31692421e1a19d62cd69bf4d96bcd to your computer and use it in GitHub Desktop.
Estadísticas básicas en Python con Numpy.
import numpy as np
arreglo_primos = np.array([2, 3, 7, 19, 23])
# Promedio:
print(np.mean(arreglo_primos))
print('')
# Mediana:
print(np.median(arreglo_primos))
print('')
# Varianza:
print(np.var(arreglo_primos))
print('')
# Desviación estándar:
print(np.mean(arreglo_primos))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment