AMLab-Amsterdam / lie_learn

Computations involving Lie groups and harmonic analysis
MIT License
190 stars 47 forks source link

Add allow_pickle=True for NumPy 1.16.3 compatibility #6

Closed oschuett closed 5 years ago

pimdh commented 5 years ago

Maybe it would make slightly more sense to create new pickles using np.savez, storing the arrays separately, instead of storing a python list of the arrays? That way the same can be accomplished without the security risk of remote code execution, in case the file on Google Drive would ever get compromised.

This would require the changes in pinchon_hoggan_parsing.py:

np.save(os.path.join(out_folder, 'J_dense_' + str(l_min) + '-' + str(l_max)), J_dense)

to

np.savez(os.path.join(out_folder, 'J_dense_' + str(l_min) + '-' + str(l_max)), *J_dense)

And in pinchon_hoggan_dense.py:

Jd = np.load(os.path.join(os.path.dirname(__file__), 'J_dense_0-278.npy'), encoding='latin1', allow_pickle=True))

to

Jd = list(np.load(os.path.join(os.path.dirname(__file__), 'J_dense_0-278.npz'), encoding='latin1').values())

Also setup.py, would need to be updated.