February 2019
Intermediate to advanced
672 pages
16h 50m
English
Universal functions are special functions defined in NumPy that are able to operate on arrays of different sizes and shapes according to the broadcasting rules. One of the best features of Numba is the implementation of fast ufuncs.
We have already seen some ufunc examples in Chapter 3, Fast Array Operations with NumPy and Pandas. For instance, the np.log function is a ufunc because it can accept scalars and arrays of different sizes and shapes. Also, universal functions that take multiple arguments still work according to the broadcasting rules. Examples of universal functions that take multiple arguments are np.sum or np.difference.
Universal functions can be defined in standard NumPy by implementing the ...