A repository for post-processing matflow-damask simulations using python functions to calculate and plot stress, strain, etc. in a easy-to-follow jupyter notebook.
MIT License
4
stars
0
forks
source link
Example notebook: no need to close open files(?) #7
# save data to avoid re-running
with open(workflow_dir+'lattice_strain.pkl', 'wb') as ls:
pickle.dump(latticestrain, ls)
ls.close()
with open(workflow_dir+'plane_intensity.pkl', 'wb') as pi:
pickle.dump(plane_intensity, pi)
pi.close()
I think that the python with open x as y construct takes care of closing files, so you can delete the two file close commands
I think that the python
with open x as y
construct takes care of closing files, so you can delete the two file close commands