Skip to content

Instantly share code, notes, and snippets.

@werterzz
Created March 12, 2022 05:31
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 werterzz/84afdb2820c9b68fb3b54ae5fd9e909a to your computer and use it in GitHub Desktop.
Save werterzz/84afdb2820c9b68fb3b54ae5fd9e909a to your computer and use it in GitHub Desktop.
floatArr = np.random.rand(2, 4)
intArr = np.random.randint(100, size=(2, 4))
print("floatArr: \n" + str(floatArr))
print("\nintArr: \n" + str(intArr))
multArr = np.multiply(floatArr, intArr)
print("\nmultArr: \n" + str(multArr))
# Output
# floatArr:
# [[0.33808962 0.4617744 0.73185594 0.74211359]
# [0.7618982 0.12598845 0.25036773 0.62690446]]
# intArr:
# [[43 85 7 48]
# [35 66 51 69]]
# multArr:
# [[14.53785383 39.25082407 5.12299159 35.62145242]
# [26.66643685 8.31523783 12.768754 43.25640774]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment