canvas.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:muscle-plotter 作者: PedroLopes 项目源码 文件源码
def calculate_target_coordinates(self):

        def simple_function(x):
            y = 0
            x = float(x)
            for i, c in enumerate(reversed(self.constants)):
                y += c * (x / 2000) ** i
            return (y * self.scaling)

        calculate = np.vectorize(simple_function)
        x_variables = np.arange(self.major_axis_span, dtype=float)
        y_variables = calculate(x_variables)
        return self.prepare_coordinates(x_variables, y_variables)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号