1. Home
  2. Data Science
  3. NumPy
  4. Which function stacks arrays horizontally?

Added 14 Sep 2025

Which function stacks arrays horizontally?

  1. np.vstack
  2. np.hstack Correct answer
  3. np.concatenate
  4. np.append

Correct answer

B. np.hstack

16 views

MCQSEXAM

Explanation

np.hstack() concatenates along axis 1.

Reference

https://numpy.org/doc/stable/reference/generated/numpy.hstack.html

Doubts & discussion

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