Numpy MCQs with answers Page - 5

Here, you will find a collection of MCQ questions on Numpy. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. What is the purpose of np.einsum()?

  • (A) To perform summation over specified axes using Einstein notation
  • (B) To compute element-wise exponential functions
  • (C) To calculate the inverse of a matrix
  • (D) To perform element-wise multiplication

A

Admin • 802.91K Points
Coach

Q. Which function is used to compute both eigenvalues and eigenvectors of a square matrix?

  • (A) np.linalg.svd
  • (B) np.linalg.inv
  • (C) np.linalg.eig
  • (D) np.linalg.cholesky

A

Admin • 802.91K Points
Coach

Q. What does adding np.newaxis to an array index do?

  • (A) It increases the dimensions of the array
  • (B) It decreases the dimensions of the array
  • (C) It transposes the array
  • (D) It reshapes the array into a flat vector

A

Admin • 802.91K Points
Coach

Q. Which module within NumPy is dedicated to linear algebra operations?

  • (A) np.linalg
  • (B) np.random
  • (C) np.fft
  • (D) np.core

A

Admin • 802.91K Points
Coach

Q. What does the np.ma module in NumPy provide?

  • (A) Support for arrays with masked (missing or invalid) data
  • (B) Advanced matrix algebra routines
  • (C) Memory management for large arrays
  • (D) An interface for parallel computing

A

Admin • 802.91K Points
Coach

Q. Which of the following functions is part of the Fast Fourier Transform (FFT) capabilities in NumPy?

  • (A) np.fft.fft
  • (B) np.fft.ifft
  • (C) np.fft.fftn
  • (D) All of the above

A

Admin • 802.91K Points
Coach

Q. How do you compute the determinant of a matrix using NumPy?

  • (A) np.linalg.det
  • (B) np.det
  • (C) np.linalg.diag
  • (D) np.matrix.det

A

Admin • 802.91K Points
Coach

Q. Which function is used to stack arrays vertically?

  • (A) np.vstack()
  • (B) np.hstack()
  • (C) np.stack()
  • (D) np.concatenate()

A

Admin • 802.91K Points
Coach

Q. Which NumPy function computes the element-wise natural logarithm of an array?

  • (A) np.log10()
  • (B) np.log2()
  • (C) np.log()
  • (D) np.ln()

A

Admin • 802.91K Points
Coach

Q. What is the primary function of np.histogram()?

  • (A) To calculate a histogram of data
  • (B) To sort the data
  • (C) To compute cumulative sums
  • (D) To filter outliers from data

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ