(self)
| 268 | assert_almost_equal(result, 9, err_msg=msg) |
| 269 | |
| 270 | def test_modular_power(self): |
| 271 | # modular power is not implemented, so ensure it errors |
| 272 | a = 5 |
| 273 | b = 4 |
| 274 | c = 10 |
| 275 | expected = pow(a, b, c) # noqa: F841 |
| 276 | for t in (np.int32, np.float32, np.complex64): |
| 277 | # note that 3-operand power only dispatches on the first argument |
| 278 | assert_raises(TypeError, operator.pow, t(a), b, c) |
| 279 | assert_raises(TypeError, operator.pow, np.array(t(a)), b, c) |
| 280 | |
| 281 | |
| 282 | def floordiv_and_mod(x, y): |
nothing calls this directly
no test coverage detected