Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Last active May 30, 2018 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/8b927435cd707461c98baf68b076bebe to your computer and use it in GitHub Desktop.
Save Fhernd/8b927435cd707461c98baf68b076bebe to your computer and use it in GitHub Desktop.
Cálculo con valores numéricos almacenados en arreglos. OrtizOL.
import numpy as np
arreglo1 = np.array([2, 3, 5, 7, 11])
arreglo2 = np.array([13, 17, 19, 13, 29])
print(arreglo1 * 2)
print(arreglo1 + 5)
print(arreglo1 + arreglo2)
print(arreglo1 * arreglo2)
def f(x):
return 3 * x ** 2 - 2 * x + 7
print(f(arreglo1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment