skuschel / postpic

The open-source particle-in-cell post-processor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Field.loadfrom` fails

Ablinne opened this issue · comments

Current master, python3.

Due to this change in numpy numpy/numpy#12889, Field.loadfrom fails due to the new default value of allow_pickle:

ERROR: test_importexport_npz (test.test_io.TestIO)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/albn/Physik/Postpic/postpic-devel/test/test_io.py", line 34, in test_importexport_npz
    testfield2 = pp.load_field(filename)
  File "/home/albn/Physik/Postpic/postpic-devel/postpic/io/__init__.py", line 40, in load_field
    return _import_field_npy(filename)
  File "/home/albn/Physik/Postpic/postpic-devel/postpic/io/npy.py", line 84, in _import_field_npy
    meta_ax_transformed_origins = import_file['meta_ax_transformed_origins']
  File "/usr/lib/python3.7/site-packages/numpy/lib/npyio.py", line 262, in __getitem__
    pickle_kwargs=self.pickle_kwargs)
  File "/usr/lib/python3.7/site-packages/numpy/lib/format.py", line 692, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False