def sph_kn(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) or less(z,<NUM_LIT:0>):<EOL><INDENT>nm,In,Inp,kn,knp = specfun.csphik(n1,z)<EOL><DEDENT>else:<EOL><INDENT>nm,kn,knp = specfun.sphk(n1,z)<EOL><DEDENT>return kn[:(n+<NUM_LIT:1>)], knp[:(n+<NUM_LIT:1>)]<EOL>
Compute the spherical Bessel function kn(z) and its derivative for
    all orders up to and including n.