本文整理汇总了Python中skillmodels.SkillModel._params_slice_for_trans_coeffs方法的典型用法代码示例。如果您正苦于以下问题:Python SkillModel._params_slice_for_trans_coeffs方法的具体用法?Python SkillModel._params_slice_for_trans_coeffs怎么用?Python SkillModel._params_slice_for_trans_coeffs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类skillmodels.SkillModel
的用法示例。
在下文中一共展示了SkillModel._params_slice_for_trans_coeffs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_params_slices_for_trans_coeffs
# 需要导入模块: from skillmodels import SkillModel [as 别名]
# 或者: from skillmodels.SkillModel import _params_slice_for_trans_coeffs [as 别名]
def test_params_slices_for_trans_coeffs(self, mock_tf):
mock_tf.nr_coeffs_first_func.return_value = 3
mock_tf.nr_coeffs_second_func.return_value = 10
self._general_params_slice = Mock(
side_effect=[slice(0, 3), slice(3, 13), slice(13, 23)])
res = smo._params_slice_for_trans_coeffs(self, params_type='short')
self._general_params_slice.assert_has_calls(
[call(3), call(10), call(10)])
mock_tf.nr_coeffs_first_func.assert_has_calls(
[call(included_factors=['f1', 'f2'], params_type='short')])
mock_tf.nr_coeffs_second_func.assert_has_calls(
[call(included_factors=['f2'], params_type='short')] * 2)
assert_equal([[slice(0, 3)] * 2, [slice(3, 13), slice(13, 23)]], res)