Created
February 4, 2020 15:08
-
-
Save robertlugg/5d6957e9f4d6e1fcc0acd256973a1558 to your computer and use it in GitHub Desktop.
Numpy usage example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | 2 | 3 | 4 | 5 | 6 | 7 | |
---|---|---|---|---|---|---|---|
2 | 4 | 6 | 8 | 10 | 12 | 14 | |
324 | 123 | 345 | 564 | 567 | 345 | 554 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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