Applies the wrapped sympy function elementwise to NumPy arrays.
Required because the sympy math functions cannot deal with NumPy arrays.
We implement no broadcasting; if the first argument is a NumPy array, we assume
all the arguments are arrays of the same shape.