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

Added 25 Feb 2024

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

  1. Joins arrays along a specified axis Correct answer
  2. Computes the dot product of two arrays
  3. Splits an array into multiple sub-arrays
  4. Flattens a multi-dimensional array

Correct answer

A. Joins arrays along a specified axis

16 views

MCQSEXAM

Explanation

The np.concatenate() function combines arrays along a specified axis. It is useful for merging arrays horizontally or vertically, depending on the axis parameter.

Doubts & discussion

Not sure why the answer is A? 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