Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active January 22, 2021 04:47
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 IndhumathyChelliah/e4b76cfdb637160c147530d4170838a4 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/e4b76cfdb637160c147530d4170838a4 to your computer and use it in GitHub Desktop.
import numpy as np
# 2 dimensional arrays
a1=np.ones([2,1])
print (a1)
#Output:
[[1.]
[1.]]
a2=np.arange(1,5).reshape(2,2)
print (a2)
#Output
[[1 2]
[3 4]]
print (a1+a2)
#Output:
[[2. 3.]
[4. 5.]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment