You were right Rich. The problem was with few lines before my plotting command, where I was fiddling around with dic['dW_dx'] array stored in the dictionary. Since dictionaries more and less act like pointers in Python, they come with their own danger.
In other words, my old line was:
Code: Select all
yvals = np.sign(dic['dW_dx']) * np.log10(np.abs(dic['dW_dx']))
Code: Select all
yvals = np.sign(copy.deepcopy(dic['dW_dx'])) * np.log10(np.abs(copy.deepcopy(dic['dW_dx'])))
Sorry about bothering you with my mistakes. Now, at least I'm sure I can externally reproduce the net cumulative work.
Best regards
Ehsan.