mp2893 / medgan

Generative adversarial network for generating electronic health records.
BSD 3-Clause "New" or "Revised" License
270 stars 89 forks source link

Error with numpy 1.16.3 #14

Closed sylvaincom closed 5 years ago

sylvaincom commented 5 years ago

Hi Edward,

First of all, congrats on your excellent work!

My current numpy version is 1.16.3. After process_mimic.py, I was running medgan.py and I received the following error:

python medgan.py test1.matrix test2 --data_type="count"
Traceback (most recent call last):
  File "medgan.py", line 376, in <module>
    data = np.load(args.data_file)
  File "C:\Users\myusername\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\lib\npyio.py", line 451, in load
    raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

There seems to be two solutions: 1) downgrading numpy to 1.16.2 2) or adding allow_pickle=True as an argument in np.load()

I tried solution 2) and it works. In numpy 1.16.3, the default value is allow_pickle=False.

Best, Sylvain

mp2893 commented 5 years ago

Hi Sylvain,

Thanks for sharing the information! Would you like to update the code for everyone?

Thanks, Ed

sylvaincom commented 5 years ago

Hi Ed,

No problem, I just created a pull request.

Best, Sylvain

mp2893 commented 5 years ago

Thanks Sylvain!! Just merged the pull request.

Best, Ed

sylvaincom commented 5 years ago

Perfect, I'm glad I could help!