CodePudding user response:
I ran your code. It does not throw any ZeroDivisionError, rather throws a warning. For improving the visibility of the results, you should use plt.yscale("log") so that lower values will be visible.

CodePudding user response:
I ran your code. It does not throw any ZeroDivisionError, rather throws a warning. For improving the visibility of the results, you should use plt.yscale("log") so that lower values will be visible.