本文整理汇总了Python中histogram.Histogram.isidentical方法的典型用法代码示例。如果您正苦于以下问题:Python Histogram.isidentical方法的具体用法?Python Histogram.isidentical怎么用?Python Histogram.isidentical使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类histogram.Histogram
的用法示例。
在下文中一共展示了Histogram.isidentical方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test___init__
# 需要导入模块: from histogram import Histogram [as 别名]
# 或者: from histogram.Histogram import isidentical [as 别名]
def test___init__(self):
assert_raises(TypeError,Histogram)
h1a = Histogram(100,[0,10])
h1b = Histogram(100,[0,10],'x')
h1c = Histogram(100,[0,10],'x','label')
h1d = Histogram(100,[0,10],'x','label','title')
h2a = Histogram(np.linspace(0,10,101))
h2b = Histogram(np.linspace(0,10,101),'x')
h2c = Histogram(np.linspace(0,10,101),'x','label')
h2d = Histogram(np.linspace(0,10,101),'x','label','title')
h3a = Histogram((np.linspace(0,10,101),))
h3b = Histogram((np.linspace(0,10,101),'x'))
h3c = Histogram((np.linspace(0,10,101),'x'),'label')
h3d = Histogram((np.linspace(0,10,101),'x'),'label','title')
assert_true(h1a.isidentical(h2a))
assert_true(h1b.isidentical(h2b))
assert_true(h1c.isidentical(h2c))
assert_true(h1d.isidentical(h2d))
assert_true(h1a.isidentical(h3a))
assert_true(h1b.isidentical(h3b))
assert_true(h1c.isidentical(h3c))
assert_true(h1d.isidentical(h3d))