def riccati_yn(n,x): """Compute the Ricatti-Bessel function of the second kind and its derivative for all orders up to and including n. """ if not (isscalar(n) and isscalar(x)): raise ValueError("arguments must be scalars.") if (n!= floor(n)) or (n<0): raise ValueError("n must be a non-negative integer.") if (n == 0): n1 = 1 else: n1 = n nm,jn,jnp = specfun.rcty(n1,x) return jn[:(n+1)],jnp[:(n+1)]
def riccati_yn(n, x): """Compute the Ricatti-Bessel function of the second kind and its derivative for all orders up to and including n. """ if not (isscalar(n) and isscalar(x)): raise ValueError, "arguments must be scalars." if (n != floor(n)) or (n < 0): raise ValueError, "n must be a non-negative integer." if (n == 0): n1 = 1 else: n1 = n nm, jn, jnp = specfun.rcty(n1, x) return jn[:(n + 1)], jnp[:(n + 1)]