After I read How do I clear all variables in the middle of a Python script? I used the code:
import sys
sys.modules[__name__].__dict__.clear()
and it removed all built-in names in python.
I tried to restore that by uninstalling my Anaconda and installing it again, but it seems that the problem cannot be fixed.
e.g. for my code:
ax.plot_surface(x1data2d , x2data2d , ydata2d, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
It shows the error:
NameError: name 'cm' is not defined
Do anyone know how to restore those built-in names?