def sph_jn(n,z):
if not (isscalar(n) and isscalar(z)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if (n != floor(n)) or (n < <NUM_LIT:0>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if (n < <NUM_LIT:1>):<EOL><INDENT>n1 = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>n1 = n<EOL><DEDENT>if iscomplex(z):<EOL><INDENT>nm,jn,jnp,yn,ynp = specfun.csphjy(n1,z)<EOL><DEDENT>else:<EOL><INDENT>nm,jn,jnp = specfun.sphj(n1,z)<EOL><DEDENT>return jn[:(n+<NUM_LIT:1>)], jnp[:(n+<NUM_LIT:1>)]<EOL>
Compute the spherical Bessel function jn(z) and its derivative for
    all orders up to and including n.