Introduction To NUMPY Lecture Note
Introduction To NUMPY Lecture Note
What is NUMPY
• The NumPy library is mainly used to create and edit arrays.
• An array is a data structure similar to a list, with the
difference that it can contain only one type of object.
• Arrays are faster, they have more functionalities, and they
better represent mathematical concepts like vectors and
matrices.
How to use numpy
a = np.array([(8,9,10),(11,12,13)])
print(a)
a=a.reshape(3,2)
print(a)
Numpy operations
• Slicing
a=np.array([(8,9),(10,11),(12,13)])
print(a[0:2,1])