NumPy

Question 1
Marks : +2 | -2
Pass Ratio : 100%
ndarray is also known as the alias array.
True
False
Explanation:
numpy.array is not the same as the Standard Python Library class array.array.
Question 2
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 3
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 4
Marks : +2 | -2
Pass Ratio : 100%
Which of the following sets the size of the buffer used in ufuncs?
bufsize(size)
setsize(size)
setbufsize(size)
all of the mentioned
Explanation:
Adjusting the size of the buffer may therefore alter the speed at which ufunc calculations of various sorts are completed.
Question 5
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 6
Marks : +2 | -2
Pass Ratio : 100%
Point out the wrong statement.
A universal function is a function that operates on ndarrays in an element-by-element fashion
In Numpy, universal functions are instances of the numpy.ufunction class
Many of the built-in functions are implemented in compiled C code
All of the mentioned
Explanation:
ufunc instances can also be produced using the frompyfunc factory function.
Question 7
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.
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%
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 10
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.