Skip to content

Commit

Permalink
BENCH: Added missing ufunc benchmarks
Browse files Browse the repository at this point in the history
Added divmod, float_power, heaviside, is_nat and positive
  • Loading branch information
kenogo committed Oct 11, 2017
1 parent 6af2c42 commit acae8a4
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions benchmarks/benchmarks/bench_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
import numpy as np


ufuncs = ['abs', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin',
'arcsinh', 'arctan', 'arctan2', 'arctanh', 'bitwise_and',
'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil',
'conj', 'conjugate', 'copysign', 'cos', 'cosh', 'deg2rad',
'degrees', 'divide', 'equal', 'exp', 'exp2', 'expm1',
'fabs', 'floor', 'floor_divide', 'fmax', 'fmin', 'fmod',
'frexp', 'greater', 'greater_equal', 'hypot', 'invert',
'isfinite', 'isinf', 'isnan', 'ldexp', 'left_shift', 'less',
'less_equal', 'log', 'log10', 'log1p', 'log2', 'logaddexp',
'logaddexp2', 'logical_and', 'logical_not', 'logical_or',
'logical_xor', 'maximum', 'minimum', 'mod', 'modf',
'multiply', 'negative', 'nextafter', 'not_equal', 'power',
'rad2deg', 'radians', 'reciprocal', 'remainder',
'right_shift', 'rint', 'sign', 'signbit', 'sin', 'sinh',
'spacing', 'sqrt', 'square', 'subtract', 'tan', 'tanh',
'true_divide', 'trunc']
ufuncs = ['abs', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh',
'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_not',
'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil', 'conj', 'conjugate',
'copysign', 'cos', 'cosh', 'deg2rad', 'degrees', 'divide', 'divmod',
'equal', 'exp', 'exp2', 'expm1', 'fabs', 'float_power', 'floor',
'floor_divide', 'fmax', 'fmin', 'fmod', 'frexp', 'greater',
'greater_equal', 'heaviside', 'hypot', 'invert', 'isfinite', 'isinf',
'isnan', 'isnat', 'ldexp', 'left_shift', 'less', 'less_equal', 'log',
'log10', 'log1p', 'log2', 'logaddexp', 'logaddexp2', 'logical_and',
'logical_not', 'logical_or', 'logical_xor', 'maximum', 'minimum',
'mod', 'modf', 'multiply', 'negative', 'nextafter', 'not_equal',
'positive', 'power', 'rad2deg', 'radians', 'reciprocal', 'remainder',
'right_shift', 'rint', 'sign', 'signbit', 'sin', 'sinh', 'spacing',
'sqrt', 'square', 'subtract', 'tan', 'tanh', 'true_divide', 'trunc']

for name in dir(np):
if isinstance(getattr(np, name, None), np.ufunc) and name not in ufuncs:
Expand Down

0 comments on commit acae8a4

Please sign in to comment.