本文整理汇总了Python中arch.bootstrap.IIDBootstrap._repr_html方法的典型用法代码示例。如果您正苦于以下问题:Python IIDBootstrap._repr_html方法的具体用法?Python IIDBootstrap._repr_html怎么用?Python IIDBootstrap._repr_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arch.bootstrap.IIDBootstrap
的用法示例。
在下文中一共展示了IIDBootstrap._repr_html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_str
# 需要导入模块: from arch.bootstrap import IIDBootstrap [as 别名]
# 或者: from arch.bootstrap.IIDBootstrap import _repr_html [as 别名]
def test_str(self):
bs = IIDBootstrap(self.y_series)
expected = 'IID Bootstrap(no. pos. inputs: 1, no. keyword inputs: 0)'
assert_equal(str(bs), expected)
expected = expected[:-1] + ', ID: ' + hex(id(bs)) + ')'
assert_equal(bs.__repr__(), expected)
expected = '<strong>IID Bootstrap</strong>(' + \
'<strong>no. pos. inputs</strong>: 1, ' + \
'<strong>no. keyword inputs</strong>: 0, ' + \
'<strong>ID</strong>: ' + hex(id(bs)) + ')'
assert_equal(bs._repr_html(), expected)
bs = StationaryBootstrap(10, self.y_series, self.x_df)
expected = 'Stationary Bootstrap(block size: 10, no. pos. inputs: 2, no. keyword inputs: 0)'
assert_equal(str(bs), expected)
expected = expected[:-1] + ', ID: ' + hex(id(bs)) + ')'
assert_equal(bs.__repr__(), expected)
bs = CircularBlockBootstrap(block_size=20, y=self.y_series, x=self.x_df)
expected = 'Circular Block Bootstrap(block size: 20, no. pos. inputs: 0, no. keyword inputs: 2)'
assert_equal(str(bs), expected)
expected = expected[:-1] + ', ID: ' + hex(id(bs)) + ')'
assert_equal(bs.__repr__(), expected)
expected = '<strong>Circular Block Bootstrap</strong>' + \
'(<strong>block size</strong>: 20, ' \
+ '<strong>no. pos. inputs</strong>: 0, ' + \
'<strong>no. keyword inputs</strong>: 2,' + \
' <strong>ID</strong>: ' + hex(id(bs)) + ')'
assert_equal(bs._repr_html(), expected)