The documentation says that to activate automatic conversion of numpy objects to R, do the following:
from rpy2.robjects.numpy2ri import numpy2ri ro.conversion.py2ri = numpy2ri
However, I found that this does not correctly activate the conversions, leading to non-numpy objects ending up in the numpy2ri function, raising an AttributeError when the function tries to access a dtype property that isn't there.
If however I do the following:
import rpy2.robjects.numpy2ri as numpy2ri numpy2ri.activate()
...everything seems to work OK.
Suggesting making the documentation clear about the correct way to activate the numpy conversion.