1. Home
  2. Data Science
  3. NumPy
  4. How can you concatenate two NumPy arrays vertically?

Added 28 Jan 2024

How can you concatenate two NumPy arrays vertically?

  1. np.add()
  2. np.concatenate(axis=0)
  3. np.vstack() Correct answer
  4. np.merge(vertical=True)

Correct answer

C. np.vstack()

15 views

MCQSEXAM

Explanation

np.vstack() vertically stacks arrays in NumPy.

Video explanation

Reference

https://www.w3schools.com/python/numpy/default.asp

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