예제 #1
0
파일: base.py 프로젝트: sjhernes/chaospy
def std(P, axis=None):
    A = P.A.copy()
    if P.dtype==f.frac:
        for key in P.keys:
            A[key] = f.std(A[key], axis)
    else:
        for key in P.keys:
            A[key] = np.std(A[key], axis)
    return Poly(A, P.dim, None, P.dtype)
예제 #2
0
def std(P, axis=None):
    A = P.A.copy()
    if P.dtype == f.frac:
        for key in P.keys:
            A[key] = f.std(A[key], axis)
    else:
        for key in P.keys:
            A[key] = np.std(A[key], axis)
    return Poly(A, P.dim, None, P.dtype)
예제 #3
0
def std(A, axis):

    if isinstance(A, (int, long, float, np.ndarray)):
        return np.std(A, axis)

    elif isinstance(A, f.frac):
        return f.std(A, axis)

    elif isinstance(A, p.Poly):
        return p.std(A, axis)

    raise NotImplementedError
예제 #4
0
파일: wrapper.py 프로젝트: apetcho/chaospy
def std(A, axis):

    if isinstance(A, (int, long, float, np.ndarray)):
        return np.std(A, axis)

    elif isinstance(A, f.frac):
        return f.std(A, axis)

    elif isinstance(A, p.Poly):
        return p.std(A, axis)

    raise NotImplementedError