(self)
| 237 | assert_(eq([1, 2], count(ott, 0))) |
| 238 | |
| 239 | def test_testMinMax(self): |
| 240 | # Test minimum and maximum. |
| 241 | x, _, _, _, _, xm, _, _, _, _, _ = self._create_data() |
| 242 | xr = np.ravel(x) # max doesn't work if shaped |
| 243 | xmr = ravel(xm) |
| 244 | |
| 245 | # true because of careful selection of data |
| 246 | assert_(eq(max(xr), maximum.reduce(xmr))) |
| 247 | assert_(eq(min(xr), minimum.reduce(xmr))) |
| 248 | |
| 249 | def test_testAddSumProd(self): |
| 250 | # Test add, sum, product. |