摘要:
import numpy as npdef triangle_wave(x, c, c0, hc): x = x - int(x) # 三角波的周期为1,因此只取 x 坐标的小数部分进行计算 if x >= c: r = 0.0 el... 阅读全文
摘要:
import numpy as npx = np.linspace(0, 2 * np.pi, 10)t = np.sin(x, out=x)print('x; ', x) # 值存到了x里面"""运 算 符 对应的ufunc 函数y = x1 + x2 ad... 阅读全文