@np.deprecate(message='scipy.special.sph_jn is deprecated in scipy 0.18.0. Use scipy.special.spherical_jn instead. Note that the new function has a different signature.')
def sph_jn(n, z):
 if (not (isscalar(n) and isscalar(z))):
  raise ValueError('arguments must be scalars.')
 if ((n != floor(n)) or (n < 0)):
  raise ValueError('n must be a non-negative integer.')
 if (n < 1):
  n1 = 1
 else:
  n1 = n
 if iscomplex(z):
  (nm, jn, jnp, yn, ynp) = specfun.csphjy(n1, z)
 else:
  (nm, jn, jnp) = specfun.sphj(n1, z)
 return (jn[:(n + 1)], jnp[:(n + 1)])

@ np . deprecate ( message = 'scipy.special.sph_jn is deprecated in scipy 0.18.0. Use scipy.special.spherical_jn instead. Note that the new function has a different signature.' ) def sph_jn ( n , z ) : if ( not ( isscalar ( n ) and isscalar ( z ) ) ) : raise ValueError ( 'arguments must be scalars.' ) if ( ( n != floor ( n ) ) or ( n < 0 ) ) : raise ValueError ( 'n must be a non-negative integer.' ) if ( n < 1 ) : n1 = 1 else : n1 = n if iscomplex ( z ) : ( nm , jn , jnp , yn , ynp ) = specfun . csphjy ( n1 , z ) else : ( nm , jn , jnp ) = specfun . sphj ( n1 , z ) return ( jn [ : ( n + 1 ) ] , jnp [ : ( n + 1 ) ] )
compute spherical bessel function jn(z) and derivative .