示例#1
0
def converges(mat):
    np.save("mat2par.npy", mat2par(mat))
    ph = np.concatenate([phenotypes(i) for i in mat2par(mat)])
    np.save("ph.npy", ph)
    fail = [np.isnan(i.item()).all() for i in ph]
    result = np.logical_not(fail).astype(float)
    return py2ri(result)
示例#2
0
def appeak(mat):
    ph = np.concatenate([phenotypes(i) for i in mat2par(mat)])
    result = ph["appeak"]
    result[np.isnan(result)] = 0
    return py2ri(result)
示例#3
0
 def fun(rmatrix):
     """Scalar function for use with R's sensitivity::morris()."""
     ph = np.concatenate([phenotypes(i) for i in mat2par(rmatrix)])
     return py2ri(ph[field])