예제 #1
0
파일: basic.py 프로젝트: alexleach/scipy
def jnyn_zeros(n,nt):
    """Compute nt zeros of the Bessel functions Jn(x), Jn'(x), Yn(x), and
    Yn'(x), respectively. Returns 4 arrays of length nt.

    See jn_zeros, jnp_zeros, yn_zeros, ynp_zeros to get separate arrays.
    """
    if not (isscalar(nt) and isscalar(n)):
        raise ValueError("Arguments must be scalars.")
    if (floor(n)!=n) or (floor(nt)!=nt):
        raise ValueError("Arguments must be integers.")
    if (nt <=0):
        raise ValueError("nt > 0")
    return specfun.jyzo(abs(n),nt)
예제 #2
0
파일: basic.py 프로젝트: minrk/scipy
def jnyn_zeros(n, nt):
    """Compute nt zeros of the Bessel functions Jn(x), Jn'(x), Yn(x), and
    Yn'(x), respectively. Returns 4 arrays of length nt.

    See jn_zeros, jnp_zeros, yn_zeros, ynp_zeros to get separate arrays.
    """
    if not (isscalar(nt) and isscalar(n)):
        raise ValueError, "Arguments must be scalars."
    if (floor(n) != n) or (floor(nt) != nt):
        raise ValueError, "Arguments must be integers."
    if (nt <= 0):
        raise ValueError, "nt > 0"
    return specfun.jyzo(abs(n), nt)