NumPy

Question 1
Marks : +2 | -2
Pass Ratio : 100%
___________ decompose the elements of x into mantissa and twos exponent.
trunc
fmod
frexp
ldexp
Explanation:
fmod function return the element-wise remainder of division.
Question 2
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 3
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 4
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 5
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 6
Marks : +2 | -2
Pass Ratio : 100%
Point out the wrong statement.
ipython is an enhanced interactive Python shell
matplotlib will enable you to plot graphics
rPy provides a lot of scientific routines that work on top of NumPy
all of the mentioned
Explanation:
SciPy provides a lot of scientific routines that work on top of NumPy.
Question 7
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 8
Marks : +2 | -2
Pass Ratio : 100%
Which of the following set the floating-point error callback function or log object?
setter
settercall
setterstack
all of the mentioned
Explanation:
seterr sets how floating-point errors are handled.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Point out the wrong statement.
Each universal function takes array inputs and produces array outputs
Broadcasting is used throughout NumPy to decide how to handle disparately shaped arrays
The output of the ufunc is necessarily an ndarray, if all input arguments are ndarrays
All of the mentioned
Explanation:
The output of the ufunc is not necessarily an ndarray, if all input arguments are not ndarrays.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is contained in NumPy library?
n-dimensional array object
tools for integrating C/C++ and Fortran code
fourier transform
all of the mentioned
Explanation:
NumPy is the fundamental package for scientific computing with Python.