NumPy MCQ

Correct Answer : Option (B) :   ones_like


Explanation : The optional output arguments of the function can be used to help you save memory for large calculations.

  Show Answer

Correct Answer : Option (D) :   All of the mentioned

  Show Answer

Correct Answer : Option (C) :   view

  Show Answer

Correct Answer : Option (C) :   iscomplex


Explanation : iscomplex function returns a bool array, where true if input element is complex.

  Show Answer

Correct Answer : Option (A) :   settercall

  Show Answer

Correct Answer : Option (B) :   frexp

  Show Answer
7 .
What will be output for the following code?
 
import numpy as np 
a = np.array([1, 2, 3], dtype = complex) 
print a

Correct Answer : Option (D) :   [ 1.+0.j, 2.+0.j, 3.+0.j]

  Show Answer

Correct Answer : Option (D) :   Negative one


Explanation : If a dimension is given as -1 in a reshaping operation, the other dimensions are automatically calculated.

  Show Answer

Correct Answer : Option (C) :   numpy.dtype(object, align, copy)


Explanation : A dtype object is constructed using the following syntax : numpy.dtype(object, align, copy)

  Show Answer

Correct Answer : Option (A) :   The array object returned by __array_prepare__ is passed to the ufunc for computation.


Explanation : The array object returned by __array_prepare__ is passed to the ufunc for computation is true

  Show Answer