Do not use python code for elemwise with >= 32 inputs

NumPy is not able to deal with that many inputs to a ufunc,
and will segfault or raise an Exception.
Merge pull request #1679 from lamblin/ufunc_max_nb_inputs

Do not use python code for elemwise with >= 32 inputs