Feed on
Posts
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()


Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

3 Responses to “resolve “Nothing can be done for the type” errors when using rpy2”

  1. on 07 May 2016 at 11:05 am Ronnie Hesselschward

    “Kredyty Konsolidacyjne”

  2. on 03 Jun 2016 at 8:13 pm Scarlet Grobstein

    syndyk warszawa

  3. on 06 Jul 2016 at 8:18 pm Iris Zapoticky

    kamizelka asekuracyjna

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.