(self)
| 1228 | class TestAngle: |
| 1229 | |
| 1230 | def test_basic(self): |
| 1231 | x = [1 + 3j, np.sqrt(2) / 2.0 + 1j * np.sqrt(2) / 2, |
| 1232 | 1, 1j, -1, -1j, 1 - 3j, -1 + 3j] |
| 1233 | y = angle(x) |
| 1234 | yo = [ |
| 1235 | np.arctan(3.0 / 1.0), |
| 1236 | np.arctan(1.0), 0, np.pi / 2, np.pi, -np.pi / 2.0, |
| 1237 | -np.arctan(3.0 / 1.0), np.pi - np.arctan(3.0 / 1.0)] |
| 1238 | z = angle(x, deg=True) |
| 1239 | zo = np.array(yo) * 180 / np.pi |
| 1240 | assert_array_almost_equal(y, yo, 11) |
| 1241 | assert_array_almost_equal(z, zo, 11) |
| 1242 | |
| 1243 | def test_subclass(self): |
| 1244 | x = np.ma.array([1 + 3j, 1, np.sqrt(2)/2 * (1 + 1j)]) |
nothing calls this directly
no test coverage detected