(self)
| 635 | h.at(*range(50)).value |
| 636 | |
| 637 | def test_out_of_range(self): |
| 638 | h = histogram(regular(3, 0, 1)) |
| 639 | h(-1) |
| 640 | h(2) |
| 641 | self.assertEqual(h.at(-1).value, 1) |
| 642 | self.assertEqual(h.at(3).value, 1) |
| 643 | with self.assertRaises(IndexError): |
| 644 | h.at(-2).value |
| 645 | with self.assertRaises(IndexError): |
| 646 | h.at(4).value |
| 647 | with self.assertRaises(IndexError): |
| 648 | h.at(-2).variance |
| 649 | with self.assertRaises(IndexError): |
| 650 | h.at(4).variance |
| 651 | |
| 652 | def test_operators(self): |
| 653 | h = histogram(integer(0, 2)) |