NumPy

Question 1
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 2
Marks : +2 | -2
Pass Ratio : 100%
To create sequences of numbers, NumPy provides a function __________ analogous to range that returns arrays instead of lists.
arange
aspace
aline
all of the mentioned
Explanation:
When arange is used with floating point arguments, it is generally not possible to predict the number of elements obtained.
Question 3
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 4
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 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%
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 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 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.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which of the following method creates a new array object that looks at the same data?
view
copy
paste
all of the mentioned
Explanation:
The copy method makes a complete copy of the array and its data.
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.