datatypes NumPy
Qus. 1 : which one is the correct syntax to create an array of type float?
- arr=np.float([1,2,3,4])
- arr=np.array([1,2,3,4]).toFloat()
- arr=np.array([1,2,3,4],dtype='float')
- arr=np.farray([1,2,3,4])
- arr=np.array([1,2,3,4],dtype='float')
- arr=np.array([1,2,3,4],dtype='f')
- arr=np.array([1,2,3,4],dtype=float)
- All of the above
- int
- array
- tuple
- list
- full
- empty
- init
- None of these
- float
- integer
- string
- boolean
Programs
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Write a program to find the intersection of two arrays