(self)
| 425 | assert_almost_equal(y, y_r) |
| 426 | |
| 427 | def test_fabs(self): |
| 428 | # Test that np.abs(x +- 0j) == np.abs(x) (as mandated by C99 for cabs) |
| 429 | x = np.array([1 + 0j], dtype=complex) |
| 430 | assert_array_equal(np.abs(x), np.real(x)) |
| 431 | |
| 432 | x = np.array([complex(1, ncu.NZERO)], dtype=complex) |
| 433 | assert_array_equal(np.abs(x), np.real(x)) |
| 434 | |
| 435 | x = np.array([complex(np.inf, ncu.NZERO)], dtype=complex) |
| 436 | assert_array_equal(np.abs(x), np.real(x)) |
| 437 | |
| 438 | x = np.array([complex(np.nan, ncu.NZERO)], dtype=complex) |
| 439 | assert_array_equal(np.abs(x), np.real(x)) |
| 440 | |
| 441 | def test_cabs_inf_nan(self): |
| 442 | x, y = [], [] |
nothing calls this directly
no test coverage detected