(self)
| 1268 | assert_equal(xm.mask, [1, 1]) |
| 1269 | |
| 1270 | def test_basic_ufuncs(self): |
| 1271 | # Test various functions such as sin, cos. |
| 1272 | x, y, _, _, _, xm, ym, z, zm, _ = self._create_data() |
| 1273 | assert_equal(np.cos(x), cos(xm)) |
| 1274 | assert_equal(np.cosh(x), cosh(xm)) |
| 1275 | assert_equal(np.sin(x), sin(xm)) |
| 1276 | assert_equal(np.sinh(x), sinh(xm)) |
| 1277 | assert_equal(np.tan(x), tan(xm)) |
| 1278 | assert_equal(np.tanh(x), tanh(xm)) |
| 1279 | assert_equal(np.sqrt(abs(x)), sqrt(xm)) |
| 1280 | assert_equal(np.log(abs(x)), log(xm)) |
| 1281 | assert_equal(np.log10(abs(x)), log10(xm)) |
| 1282 | assert_equal(np.exp(x), exp(xm)) |
| 1283 | assert_equal(np.arcsin(z), arcsin(zm)) |
| 1284 | assert_equal(np.arccos(z), arccos(zm)) |
| 1285 | assert_equal(np.arctan(z), arctan(zm)) |
| 1286 | assert_equal(np.arctan2(x, y), arctan2(xm, ym)) |
| 1287 | assert_equal(np.absolute(x), absolute(xm)) |
| 1288 | assert_equal(np.angle(x + 1j * y), angle(xm + 1j * ym)) |
| 1289 | assert_equal(np.angle(x + 1j * y, deg=True), angle(xm + 1j * ym, deg=True)) |
| 1290 | assert_equal(np.equal(x, y), equal(xm, ym)) |
| 1291 | assert_equal(np.not_equal(x, y), not_equal(xm, ym)) |
| 1292 | assert_equal(np.less(x, y), less(xm, ym)) |
| 1293 | assert_equal(np.greater(x, y), greater(xm, ym)) |
| 1294 | assert_equal(np.less_equal(x, y), less_equal(xm, ym)) |
| 1295 | assert_equal(np.greater_equal(x, y), greater_equal(xm, ym)) |
| 1296 | assert_equal(np.conjugate(x), conjugate(xm)) |
| 1297 | |
| 1298 | def test_basic_ufuncs_masked(self): |
| 1299 | # Mostly regression test for gh-25635 |
nothing calls this directly
no test coverage detected