Commit 90f0662d authored by Philipp Arras's avatar Philipp Arras
Browse files

Get rid of warning

parent 9939375c
......@@ -25,9 +25,13 @@ def _sqrt_helper(v):
def _sinc_helper(v):
tmp = np.sinc(v)
tmp2 = (np.cos(np.pi*v)-tmp)/v
return (tmp, np.where(v==0., 0, tmp2))
fv = np.sinc(v)
df = np.empty(v.shape, dtype=v.dtype)
sel = v != 0.
v = v[sel]
df[sel] = (np.cos(np.pi*v)-fv[sel])/v
df[~sel] = 0
return (fv, df)
def _expm1_helper(v):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment