3d_plot1 RuntimeWarning: divide by zero encountered in scalar divide M[n, m] = num / den 해결방법 아래 코드를 실행했을때, 정상적으로 3d_plot이 나오기는 했지만, '런타임워닝'이 떴다. import numpy as np import matplotlib.pyplot as plt B = [1, -20] A = [1, 0, 100] S = np.zeros((50, 50), dtype=complex) for n in range(50): for m in range(50): S[n, m] = (n - 25) + 1j * (m - 25) M = np.zeros((50, 50), dtype=complex) for n in range(50): for m in range(50): s = S[n, m] num = B[0] * s + B[1] den = A[0] * s**2 + A[1] * s**1 + A[2] M[.. TroubleShooting 2023. 10. 20. 이전 1 다음