Best way to implement numpy.sin(x) / x where x might contain 0
<p>What I am doing now is:</p>

<pre><code>import numpy as np

eps = np.finfo(float).eps

def sindiv(x):
    x = np.abs(x)
    return np.maximum(eps, np.sin(x)) / np.maximum(eps, x)
</code></pre>

<p>But there is quite a lot of additional array operation. Is there a better way?</p>