(self)
| 4163 | assert_(result is output) |
| 4164 | |
| 4165 | def test_ptp(self): |
| 4166 | # Tests ptp on MaskedArrays. |
| 4167 | _, X, _, m, mx, mX, _, _, _, _ = self._create_data() |
| 4168 | (n, m) = X.shape |
| 4169 | assert_equal(mx.ptp(), np.ptp(mx.compressed())) |
| 4170 | rows = np.zeros(n, float) |
| 4171 | cols = np.zeros(m, float) |
| 4172 | for k in range(m): |
| 4173 | cols[k] = np.ptp(mX[:, k].compressed()) |
| 4174 | for k in range(n): |
| 4175 | rows[k] = np.ptp(mX[k].compressed()) |
| 4176 | assert_equal(mX.ptp(0), cols) |
| 4177 | assert_equal(mX.ptp(1), rows) |
| 4178 | |
| 4179 | def test_add_object(self): |
| 4180 | x = masked_array(['a', 'b'], mask=[1, 0], dtype=object) |
nothing calls this directly
no test coverage detected