diff options
author | cookedm <cookedm@localhost> | 2006-03-09 03:12:32 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-03-09 03:12:32 +0000 |
commit | 15dea0280a1c9eaf6acfd488679ab60ca88671c0 (patch) | |
tree | 99e33bd2b589577af0b93a4b37dc0746c5d44f02 | |
parent | 1c82c1fa5d12f83ad60f197b2940f5eb7489186c (diff) | |
download | numpy-15dea0280a1c9eaf6acfd488679ab60ca88671c0.tar.gz |
Add unit test for negative complex powers
-rw-r--r-- | numpy/core/tests/test_umath.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index 204c88dab..b052145a9 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -21,6 +21,8 @@ class test_power(ScipyTestCase): assert_equal(x**1, x) assert_equal(x**2, [-3+4j, -5+12j, -7+24j]) assert_almost_equal(x**(-1), [1/(1+2j), 1/(2+3j), 1/(3+4j)]) + assert_almost_equal(x**(-3), [(-11+2j)/125, (-46-9j)/2197, + (-117-44j)/15625]) assert_almost_equal(x**(0.5), [ncu.sqrt(1+2j), ncu.sqrt(2+3j), ncu.sqrt(3+4j)]) assert_almost_equal(x**14, [-76443+16124j, 23161315+58317492j, |