摘要: import numpy as npdef triangle_wave(x, c, c0, hc): x = x - int(x) # 三角波的周期为1,因此只取 x 坐标的小数部分进行计算 if x >= c: r = 0.0 el... 阅读全文
posted @ 2018-07-24 15:04 LeeJuly 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-07-24 12:57 LeeJuly 阅读(140) 评论(0) 推荐(0) 编辑