A mixed cython/numpy wrapper with array broadcast capability

The idea behind this wrapper is taken from: https://github.com/cython/cython/wiki/tutorials-numpy#dimensionally-simple-functions
The return code needs to be dealt with and converted into an exception here.