Skip to content

Commit

Permalink
Merge pull request #11 from TUW-GEO/fix-numpy-pickle
Browse files Browse the repository at this point in the history
Set allow_pickle to True when loading metadata
  • Loading branch information
wpreimes committed Apr 24, 2019
2 parents ce0f443 + 9189c1f commit da9cdca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ismn/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def __init__(self, path_to_data, network=None):
#np.savetxt(os.path.join(path_to_data,'python_metadata','metadata.npy'), self.metadata,delimiter=',')
else:
self.metadata = np.load(
os.path.join(path_to_data, 'python_metadata', 'metadata.npy'))
os.path.join(path_to_data, 'python_metadata', 'metadata.npy'),
allow_pickle=True)

if network is not None:
if type(network) is not list:
Expand Down Expand Up @@ -1074,4 +1075,4 @@ def print_climate_dict(self):
print('KOEPPEN GEIGER Climate Classification')
print('-------------------------------------')
for key in self.climate.keys():
print('{:4}: {}'.format(key, self.climate[key]))
print('{:4}: {}'.format(key, self.climate[key]))

0 comments on commit da9cdca

Please sign in to comment.