resolve “Nothing can be done for the type” errors when using rpy2
Posted in Python, R on August 3rd, 2011 No Comments »
Importing arrays from numpy to rpy2 can throw the following error: ValueError: Nothing can be done for the type <type ‘numpy.ndarray’> at the moment. To resolve, add the following to the top of your Python code: import rpy2.robjects.numpy2ri rpy2.robjects.numpy2ri.activate()