universal functionor ufuncis function that performs elementwise operations on data in ndarrays you can think of them as fast vectorized wrappers for simple functions that take one or more scalar values and produce one or more scalar results many ufuncs are simple elementwise transformationslike sqrt or expin [ ]arr np arange( in [ ]np sqrt(arrout[ ]array( ]in [ ]np exp(arrout[ ]array( ]these are referred to as unary ufuncs otherssuch as add or maximumtake arrays (thusbinary ufuncsand return single array as the resultin [ ] randn( in [ ] randn( in [ ] out[ ]array( - ] - in [ ] out[ ]array( - - - ] - in [ ]np maximum(xyelement-wise maximum out[ ]array( - ] while not commona ufunc can return multiple arrays modf is one examplea vectorized version of the built-in python divmodit returns the fractional and integral parts of floating point arrayin [ ]arr randn( in [ ]np modf(arrout[ ](array([- - - array([- - - - ]) - ])universal functionsfast element-wise array functions www it-ebooks info