resolve “Nothing can be done for the type” errors when using rpy2
August 3rd, 2011 by Lawrence David
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()