import numpy as np
a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
print ("Using Numpy\n",a)
b=[[1,2,3,4], [5,6,7,8], [9,10,11,12]]
print ("Without Numpy\n", b)
Solve Problems by Coding Solutions - A Complete solution for python programming
Matrix representation and version detailsof Numpy
import numpy as np
print("\nVersion of Numpy is ",np.__version__)
x = np.arange(25, 50).reshape(5,5)
print("\n Matrix representation in Numpy\n",x)
print("\nVersion of Numpy is ",np.__version__)
x = np.arange(25, 50).reshape(5,5)
print("\n Matrix representation in Numpy\n",x)
Subscribe to:
Posts (Atom)