(dummy)
| 100 | |
| 101 | # cexp(inf + nan i) is +-inf + nan |
| 102 | def _check_inf_nan(dummy): |
| 103 | msgform = "cexp(-inf, nan) is (%f, %f), expected (+-inf, nan)" |
| 104 | with np.errstate(invalid='ignore'): |
| 105 | z = f(np.array(complex(np.inf, np.nan))) |
| 106 | if not np.isinf(z.real) or not np.isnan(z.imag): |
| 107 | raise AssertionError(msgform % (z.real, z.imag)) |
| 108 | |
| 109 | _check_inf_nan(None) |
| 110 |