def fun(self, x):
dx, dy, dz = self._compute_coordinate_deltas(x)
with np.errstate(divide='ignore'):
dm1 = (dx**2 + dy**2 + dz**2) ** -0.5
dm1[np.diag_indices_from(dm1)] = 0
return 0.5 * np.sum(dm1)
test_minimized_constrained.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录