Skip to content
masterclass Buddy

NumPy · Function

np.put

numpy.put replaces selected elements of an array in place. It uses indices from the array’s flattened form and can control invalid-index handling with mode.

Last updated

Syntax

numpy.put(a, ind, v, mode='raise')

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

Subscribe
  • putmask
  • place
  • put_along_axis

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