Skip to content
masterclass Buddy

NumPy · Function

np.block

np.block assembles an ndarray from nested lists of arrays or scalars. It concatenates inner lists first and then joins the results along earlier axes.

Last updated

Since
1.13.0

Syntax

numpy.block(arrays)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • concatenate
  • stack
  • vstack
  • hstack
  • dstack
  • column_stack
  • vsplit
  • unstack

Source: numpy.block — NumPy v2.5 Manual. Checked 2026-11-03.