Skip to content
masterclass Buddy

NumPy · Function

np.apply_along_axis

Applies a function to each one-dimensional slice of an array along a chosen axis. The output replaces that axis with the shape of each function result.

Last updated

Syntax

numpy.apply_along_axis(func1d, axis, arr, *args, **kwargs)

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

Subscribe
  • apply_over_axes

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