I'd move this statement to a global variable outside the function: this comparison is quite slow:
```
In [13]: %timeit NumpyVersion(np.__version__) < NumpyVersion('1.7.0')
100000 loops, best of 3: 11.7 µs per loop

In [14]: %timeit np.exp(np.log(np.linspace(0,4,200)).sum())
10000 loops, best of 3: 25.8 µs per loop
```