本文整理汇总了Python中skillmodels.SkillModel._set_bounds_for_trans_coeffs方法的典型用法代码示例。如果您正苦于以下问题:Python SkillModel._set_bounds_for_trans_coeffs方法的具体用法?Python SkillModel._set_bounds_for_trans_coeffs怎么用?Python SkillModel._set_bounds_for_trans_coeffs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类skillmodels.SkillModel
的用法示例。
在下文中一共展示了SkillModel._set_bounds_for_trans_coeffs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_set_bounds_for_trans_coeffs
# 需要导入模块: from skillmodels import SkillModel [as 别名]
# 或者: from skillmodels.SkillModel import _set_bounds_for_trans_coeffs [as 别名]
def test_set_bounds_for_trans_coeffs(self, mock_tf):
lb = np.array([0, None, None], dtype=object)
ub = np.array([None, None, 1], dtype=object)
mock_tf.bounds_first_func.return_value = (lb, ub)
del mock_tf.bounds_second_func
sl = [[slice(0, 3)] * 2, [slice(3, 13), slice(13, 23)]]
expected_lb = self.lower_bound.copy()
expected_lb[0] = 0
expected_ub = self.upper_bound.copy()
expected_ub[2] = 1
smo._set_bounds_for_trans_coeffs(self, sl)
aae(self.lower_bound, expected_lb)
aae(self.upper_bound, expected_ub)