Learn Before
Definition

NumPy Universal Function Object (ufunc)

A NumPy universal function (ufunc) is a function that operates element-wise on ndarray objects. Each ufunc wraps a core scalar function that takes scalar inputs and produces scalar outputs, and applies it across whole arrays. This allows vectorized operations to replace explicit Python loops. For example, instead of iterating through two lists to add their corresponding elements, calling the ufunc add(x, y) performs the element-wise addition in a single, faster call.

0

1

Updated 2026-07-20

Tags

Python Programming Language

Data Science