Skip to content

Instantly share code, notes, and snippets.

@robertlugg
Created February 4, 2020 15:08
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 robertlugg/5d6957e9f4d6e1fcc0acd256973a1558 to your computer and use it in GitHub Desktop.
Save robertlugg/5d6957e9f4d6e1fcc0acd256973a1558 to your computer and use it in GitHub Desktop.
Numpy usage example
1 2 3 4 5 6 7
2 4 6 8 10 12 14
324 123 345 564 567 345 554
"""
Python program using numpy
"""
import numpy as np
data_filename = 'facebook_numpy.csv'
my_array = np.genfromtxt(data_filename, delimiter=',')
print(my_array)
demo_math = my_array[0,2:5] * my_array[1,2:5]
print(demo_math)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment