(self)
| 175 | assert_(eq([1, 2], count(ott, 0))) |
| 176 | |
| 177 | def test_testMinMax(self): |
| 178 | # Test minimum and maximum. |
| 179 | (x, y, a10, m1, m2, xm, ym, z, zm, xf, s) = self.d |
| 180 | xr = np.ravel(x) # max doesn't work if shaped |
| 181 | xmr = ravel(xm) |
| 182 | |
| 183 | # true because of careful selection of data |
| 184 | assert_(eq(max(xr), maximum.reduce(xmr))) |
| 185 | assert_(eq(min(xr), minimum.reduce(xmr))) |
| 186 | |
| 187 | def test_testAddSumProd(self): |
| 188 | # Test add, sum, product. |