try({
if (reticulate::py_available(initialize = FALSE)) {
if (reticulate::py_module_available("scipy")) {
library(RGF)
set.seed(1)
x = matrix(runif(1000), nrow = 100, ncol = 10)
res = mat_2scipy_sparse(x)
print(dim(x))
print(res$shape)
}
}
}, silent = TRUE)
Run the code above in your browser using DataLab