R、 python、Networkite和limmbo:cast数组';浮动64';至';int64';错误

R、 python、Networkite和limmbo:cast数组';浮动64';至';int64';错误,python,r,reticulate,Python,R,Reticulate,我试图通过网状R包将python模块limmbo()与R一起使用。我已经成功地用Anaconda2安装了limmbo。我现在尝试使用函数limmbo$core$vdbootstrap$limmbo$runbootstrapcovianceestimation,如下代码所示。当我运行下面的代码时,我得到一个关于将float64转换为integer64的错误 ```{r} library(reticulate) import("limmbo") -> limmbo ``` 然后运行pytho

我试图通过
网状
R包将python模块
limmbo
()与R一起使用。我已经成功地用Anaconda2安装了
limmbo
。我现在尝试使用函数
limmbo$core$vdbootstrap$limmbo$runbootstrapcovianceestimation
,如下代码所示。当我运行下面的代码时,我得到一个关于将float64转换为integer64的错误

```{r}
library(reticulate)
import("limmbo") -> limmbo
```
然后运行python代码:

```{python}
import numpy
from numpy.random import RandomState
from numpy.linalg import cholesky as chol
from limmbo.core.vdsimple import vd_reml
from limmbo.io.input import InputData
random = RandomState(15)
N = 100
S = 1000
P = 3
snps = (random.rand(N, S) < 0.2).astype(float)
kinship = numpy.dot(snps, snps.T) / float(10)
y  = random.randn(N, P)
pheno = numpy.dot(chol(kinship), y)
pheno_ID = [ 'PID{}'.format(x+1) for x in range(P)]
samples = [ 'SID{}'.format(x+1) for x in range(N)]
datainput = InputData()
datainput.addPhenotypes(phenotypes = pheno,
phenotype_ID = pheno_ID, pheno_samples = samples)
datainput.addRelatedness(relatedness = kinship,
relatedness_samples = samples)
```

首先,通过导入numpy模块
npYuan的教程(上面答案中的链接)包含了一些建议,让我能够回答这个问题。以下是我修订后的R代码,到目前为止,它仍然有效:

np <- import("numpy", convert = FALSE)
(limmbo$core$vdbootstrap$LiMMBo(datainput, timing = TRUE, iterations = np_array(10, dtype = "int64"), S = np_array(2, dtype = "int64")) -> foo)
limmbo$core$vdbootstrap$LiMMBo$runBootstrapCovarianceEstimation(foo, cpus = np$int(1), seed = np_array(1232, dtype = "int64"))
np-foo)
limmbo$core$vdbootstrap$limmbo$runbootstrapcovencessivement(foo,cpu=np$int(1),seed=np_数组(1232,dtype=“int64”))

非常感谢,元!让我看看我是否可以通过教程来解决这个问题。
np <- import("numpy", convert = FALSE)
(limmbo$core$vdbootstrap$LiMMBo(datainput, timing = TRUE, iterations = np_array(10, dtype = "int64"), S = np_array(2, dtype = "int64")) -> foo)
limmbo$core$vdbootstrap$LiMMBo$runBootstrapCovarianceEstimation(foo, cpus = np$int(1), seed = np_array(1232, dtype = "int64"))