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