Skip to content
masterclass Buddy

NumPy · Function

np.empty

Creates a new NumPy array with a chosen shape and data type. Its normal numeric entries are not initialized, so fill them before reading; this can be slightly faster than creating a filled array.

Last updated

Since
2.0.0

Syntax

numpy.empty(shape, dtype=None, order='C', *, device=None, like=None)

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

Subscribe
  • empty_like
  • ones
  • zeros
  • full

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