summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-07-14 19:49:19 +0000
committercookedm <cookedm@localhost>2006-07-14 19:49:19 +0000
commitcf0dd874261547add03a56baf14b4d5102f64f1e (patch)
treecc4c89f61271e10c61587b2164efbdff1d11bb67 /numpy
parent46fa7a119d9995f5f348694ae0595f2abdf44762 (diff)
downloadnumpy-cf0dd874261547add03a56baf14b4d5102f64f1e.tar.gz
Fix failing linalg.tests.test_det on 32-bit machines for csingle.
This compares det() with the product of the eigenvalues, which were being calculated as csingles. Changing that to cdouble makes this work. I have no clue why this fails for 32-bit linux, but not 64-bit.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/linalg/tests/test_linalg.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index ca9557117..af7914200 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -71,7 +71,11 @@ class test_pinv(LinalgTestCase):
class test_det(LinalgTestCase):
def do(self, a, b):
d = linalg.det(a)
- ev = linalg.eigvals(a)
+ if a.dtype.type in (single, double):
+ ad = a.astype(double)
+ else:
+ ad = a.astype(cdouble)
+ ev = linalg.eigvals(ad)
assert_almost_equal(d, multiply.reduce(ev))
class test_lstsq(LinalgTestCase):