0

I am encountering the error message

ValueError: Object arrays cannot be loaded when allow_pickle=False

while running a tool designed by somebody else (see DUDes). The solutions proposed in the related thread suggest setting allow_pickle=True directly in the np.load function. (My understanding is that the code in question was created while this used to be the default behavior of np.load, which has changes since then.) I would like to resolved this issue without tinkering with the original code. The obvious solution would be reverting to the earlier version of numpy. However, I am wondering whether, it is possible to simply change the default behavior for np.load in the (whatever) current version of numpy/python?

Roger Vadim
  • 373
  • 2
  • 12

1 Answers1

0

The solution that has worked for me so far is downgrading numpy to a version with default setting allow_pickle=True:

conda install -c conda-forge python=3.7 numpy=1.16.2

Monkey-patching was suggested as a possible solution in the comments, but it is still not clear (to me) how to implement it here.

Roger Vadim
  • 373
  • 2
  • 12