1. Home
  2. Data Science
  3. NumPy
  4. What does the np.transpose() function do in NumPy?

Added 25 Feb 2024

What does the np.transpose() function do in NumPy?

  1. Flips the array over its diagonal
  2. Reverses the order of elements in an array
  3. Transposes the array Correct answer
  4. Reshapes the array

Correct answer

C. Transposes the array

15 views

MCQSEXAM

Explanation

The np.transpose() function permutes the dimensions of an array. For a 2D array, it effectively swaps the rows and columns. It is often used in matrix operations and data transformations.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs