示例#1
0
文件: basic.py 项目: alexleach/scipy
def pbdn_seq(n,z):
    """Compute sequence of parabolic cylinder functions Dn(z) and
    their derivatives for D0(z)..Dn(z).
    """
    if not (isscalar(n) and isscalar(z)):
        raise ValueError("arguments must be scalars.")
    if (floor(n)!=n):
        raise ValueError("n must be an integer.")
    if (abs(n) <= 1):
        n1 = 1
    else:
        n1 = n
    cpb,cpd = specfun.cpbdn(n1,z)
    return cpb[:n1+1],cpd[:n1+1]
示例#2
0
文件: basic.py 项目: minrk/scipy
def pbdn_seq(n, z):
    """Compute sequence of parabolic cylinder functions Dn(z) and
    their derivatives for D0(z)..Dn(z).
    """
    if not (isscalar(n) and isscalar(z)):
        raise ValueError, "arguments must be scalars."
    if (floor(n) != n):
        raise ValueError, "n must be an integer."
    if (abs(n) <= 1):
        n1 = 1
    else:
        n1 = n
    cpb, cpd = specfun.cpbdn(n1, z)
    return cpb[:n1 + 1], cpd[:n1 + 1]