Код: Выделить всё
[[6.99392345e-01 5.49632800e-01 5.06689159e-01]
[8.99550859e-01 4.80455778e-01 1.63756626e-03]
[2.41446967e-04 4.57143249e-01 9.02994382e-01]
[9.23099294e-01 2.97094556e-02 4.04195476e-01]
[2.17356714e-08 3.55494425e-06 1.01591254e+00]
[4.77737570e-01 6.70860436e-02 8.94129347e-01]
[3.27139377e-03 9.02816866e-01 4.49089069e-01]
[5.21335453e-01 8.64285916e-01 6.80395398e-03]
[5.20486609e-04 1.01774510e+00 3.68351896e-06]
[1.03490286e+00 2.54819339e-02 8.03965100e-03]]
Код: Выделить всё
from rpy2 import robjects
R_float_vec = robjects.vectors.FloatVector(res)
python_float_list = list(R_float_vec)
print(python_float_list)
Код: Выделить всё
[0.699392345195757, 0.5496327998634007, 0.5066891593942348, 0.8995508589109229, 0.4804557781694992, 0.0016375662579385998, 0.00024144696746143259, 0.4571432488636835, 0.9029943819120099, 0.9230992937353019]
Подробнее здесь: https://stackoverflow.com/questions/798 ... rough-rpy2
Мобильная версия