Last active
October 2, 2018 23:13
-
-
Save miguelgarcia/12ddeaead59164c42b298b48141c720d to your computer and use it in GitHub Desktop.
For each row apply a different weight to each column
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
import numpy | |
data = numpy.array( | |
[ | |
[1,2,3,4], | |
[5,6,7,8], | |
[9,10,11,12], | |
] | |
) | |
weights = [3.5, 4, 5 ,6] | |
weighted_data = data * weights | |
print(weighted_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment