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
All of the above
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
None of the above
Numbering Python
Number In Python
Numerical Python
import numpy as np
ary=np.array([1,2,3,5,8])
ary=ary+1
print(ary[1])
0
2
what will be output for the following code?
import numpy as np a=np.array([1,2,3,5,8]) print(a.ndim)
full
empty
init
Shape
Array
both a) and b)
None of the above.
all_like
ones_like
one_alike
all of the mentioned
A machine learning library
A web development framework
A numerical computing library in Python
A data visualization tool
List
Matrix
Tuple
import numpy
import np
from math import numpy
import numPy as np
It creates a new Python list.
It creates a NumPy array.
It performs element-wise addition.
It calculates the mean of an array.