更新时间:2021-07-14 18:44:49
使用列表推导将 period
函数应用到 x
数组中的每个条目,就像这样 - >
Use list comprehension to apply period
function to each entry in the x
array like this -
y = np.array([period(i) for i in x])
另外,你需要同时初始化 dem
和 g
-
Also, you need to initialize both dem
and g
-
dem = 0.0
g = 9.8