Home
Courses
About
School
Notes
Questions
MCQ
Contact
Vocational Courses
Data Science
Data Science
NumPy
Question 1
Marks :
+2
|
-2
Pass Ratio :
100%
Point out the correct statement.
NumPy main object is the homogeneous multidimensional array
In Numpy, dimensions are called axes
Numpy array class is called ndarray
All of the mentioned
Explanation:
The number of axes is called rank.
Question 2
Marks :
+2
|
-2
Pass Ratio :
100%
Which of the following function stacks 1D arrays as columns into a 2D array?
row_stack
column_stack
com_stack
all of the mentioned
Explanation:
column_stack is equivalent to vstack only for 1D arrays.
Question 3
Marks :
+2
|
-2
Pass Ratio :
100%
ndarray.dataitemSize is the buffer containing the actual elements of the array.
True
False
Explanation:
ndarray.data is the buffer containing the actual elements of the array.
Question 4
Marks :
+2
|
-2
Pass Ratio :
100%
Some ufuncs can take output arguments.
True
False
Explanation:
All ufuncs can take output arguments. If necessary, output will be cast to the data-type of the provided output array.
Question 5
Marks :
+2
|
-2
Pass Ratio :
100%
Which of the following returns an array of ones with the same shape and type as a given array?
all_like
ones_like
one_alike
all of the mentioned
Explanation:
The optional output arguments of the function can be used to help you save memory for large calculations.
Question 6
Marks :
+2
|
-2
Pass Ratio :
100%
The array object returned by __array_prepare__ is passed to the ufunc for computation.
True
False
Explanation:
If the class has an __array_wrap__ method, the returned ndarray result will be passed to that method just before passing control back to the caller.
Question 7
Marks :
+2
|
-2
Pass Ratio :
100%
The ________ function returns its argument with a modified shape, whereas the ________ method modifies the array itself.
reshape, resize
resize, reshape
reshape2, resize
all of the mentioned
Explanation:
If a dimension is given as -1 in a reshaping operation, the other dimensions are automatically calculated.
Question 8
Marks :
+2
|
-2
Pass Ratio :
100%
Which of the following function take only single value as input?
iscomplex
minimum
fmin
all of the mentioned
Explanation:
iscomplex function returns a bool array, where true if input element is complex.
Question 9
Marks :
+2
|
-2
Pass Ratio :
100%
Which of the following function can be used to combine different vectors so as to obtain the result for each n-uplet?
iid_
ix_
ixd_
all of the mentioned
Explanation:
Length of the 1D boolean array must coincide with the length of the dimension (or axis) you want to slice.
Question 10
Marks :
+2
|
-2
Pass Ratio :
100%
Which of the following attribute should be used while checking for type combination input and output?
.types
.type
.class
all of the mentioned
Explanation:
Universal functions in NumPy are flexible enough to have mixed type signatures.
1
2
3
4
5
6
7
8
9
10
Time Left:
Submit
Score
:
Rank
:
Accuracy
:
%
Time
:
Total Question
:
Attempted
:
Correct
:
Wrong
:
User Name
Email Id
Mobile No
Submit