np.array()
np.zeros()
np.empty()
All of the above
shape, dtype, ndim
objects, type, list
objects, non vectorization
Unicode and shape
make a matrix with first column 0
make a matrix with all elements 0
make a matrix with diagonal elements 0
from numpy import *
import numpy
import numpy as my_numpy
All of above
change in shape of array
reshaping of array
get the shape of the array
Number of Rows and Column in array
Size of each items in array
Number of elements in array
Largest element of an array
Size, shape
memory consumption
data type of array
All of these
Indexing
Slicing
Reshaping
None of the above
rank
dtype
shape
None of these
NumPy arrays have contiguous memory location
They are more speedy to work with
They are more convenient to deal with
Filled with Zero
Filled with Blank space
Filled with random garbage value
Filled with One
What will be output for the following code ?
import numpy as np a=np.array([2,3,4,5]) print(a.dtype)
int32
int
float
none of these
What will be the output of the following Python code?
len(["hello",2, 4, 6])
Error
6
4
3
What is the datatype of x ?
import numpy as np a=np.array([1,2,3,4]) x=a.tolist()
array
tuple
list
What is the output of the following code?
import numpy as np a=np.array([1,2,3,5,8]) b=np.array([0,3,4,2,1]) c=a+b c=c*a print(c[2])
10
21
12
28
What is the output of following code ?
a = np.array([[1,2,3],[4,5,6]]) print(a.shape)
(2,3)
(3,2)
(1,1)
What will be output for the following code?
import numpy as np a=np.array([[1,2,3],[0,1,4]]) print (a.size)
1
5
To make a Matrix with all element 0
To make a Matrix with all diagonal element 0
To make a Matrix with first row 0
Numbering Python
Number In Python
Numerical Python