A universal function (or ufunc for short) is a function that operates on ndarrays in an element-by-element fashion, supporting array broadcasting, type casting and several other standard features.
broadcast规则:
Example
If a.shape is (5,1), b.shape is (1,6), c.shape is (6,) and d.shape is () so that d is a scalar, then a, b, c, and d are all broadcastable to dimension (5,6); and
add
、substract
、multiply
、divide
、absolute
、exp
、log
、log10
、sqrt
、square
sin
、cos
、tan
、arcsin
、arccos
、arctan
、sinh
、cosh
、tanh
、arctanh
、deg2rad
、rad2deg
greater
、less_equal
、not_equal
、equal
、maximum
、minimum
isinf
、isnan
、floor
、`ceil