Home > Python, R > rpy2 error when importing numpy array

rpy2 error when importing numpy array

December 14, 2011 Leave a comment Go to comments

Get error when importing arrays from numpy to rpy2:

ValueError: Nothing can be done for the type <type ‘numpy.ndarray’> at the moment.
 Tried adding two additional import commands, and solved the problem:
import rpy2.robjects.numpy2ri
rpy2.robjects.numpy2ri.activate()
Advertisements
Categories: Python, R
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: