How can I pass large arrays between numpy and R?

后端 未结 3 1868
后悔当初
后悔当初 2021-01-04 23:03

I\'m using python and numpy/scipy to do regex and stemming for a text processing application. But I want to use some of R\'s statistical packages as well.

What\'s th

3条回答
  •  借酒劲吻你
    2021-01-04 23:39

    • Have you already looked into RPy? It's a python interface to R. I guess that would spare you the data handling.

    • To backup your NumPy arrays you can use pickle. As it seems to create a lot of overhead when saving huge data, NumPy arrays are best saved using the HDF standard. Here's a article covering that: http://www.shocksolution.com/2010/01/10/storing-large-numpy-arrays-on-disk-python-pickle-vs-hdf5adsf/

提交回复
热议问题