NUMPY -ARRAY
NumPy stands for Numerical [Link] is the core library for scientific
computing in Python.
Numpy Array works on homogeneous types
numpy. Array does not support adding and removing of elements
It consist of multidimensional array objects, and tools for working with
these arrays.
Creation of array
numpy array from array method
One dimension array can be created using array method with list object
with one dimensional elements.
e.g.
import numpy as np
a=[Link]([500,200,300]) #Createa1DArray
print(type(a)) #Prints"<class '[Link]'>"
print(a[0],a[1],a[2]) #Prints 500 200 300
a[0]=150 #Change an element of the array
print(a)
numpy array from range
[Link](start,stop,step)
#program1
import numpy as np
x=[Link](5)
print(x) #print [01234]
#program2
import numpy as np
x=[Link](10,20,2)
print(x) #print[10 12 14 16 18]