From: Krishna M. G. <gk...@gm...> - 2006-05-20 01:27:01
|
Hello, Is there any easy way to build PyGSL with NumPy. I noticed that PyGSL requires either Numeric or numarray and generates appropriate code. But NumPy is different from Numeric. Is it compatible with NumPy at all? I faked the presence of Numeric library and used convertcode.py that ships with NumPy on the PyGSL installation. I also changed "_numobj.py" "_mlab.py" appropriately. That did the trick for imports. But looks like thats not enough. When I tried to test the library I got the following errors. Is this because the test file has bugs or my installation and further modifications are not enough? [krishna@master local]$ python inst/pygsl-0.3.2/tests/blas_test.py .......................EE.....EEE.EEE......E.E ====================================================================== ERROR: testZaxpy (__main__.BlasTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "inst/pygsl-0.3.2/tests/blas_test.py", line 70, in testZaxpy 3) File "/home/krishna/local/inst/pygsl-0.3.2/tests/gsl_test.py", line 35, in arrayCompare result = result and fpcompare(a[i], l[i], digits) File "/home/krishna/local/inst/pygsl-0.3.2/tests/gsl_test.py", line 24, in fpcompare res1 = (fcmp(a, b.real, eps) == 0) TypeError: argument number 1: a 'double' is expected, 'complex128scalar((-120.5+17.29j))' is received ====================================================================== ERROR: testZaxpy_cr (__main__.BlasTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "inst/pygsl-0.3.2/tests/blas_test.py", line 78, in testZaxpy_cr 3) File "/home/krishna/local/inst/pygsl-0.3.2/tests/gsl_test.py", line 35, in arrayCompare result = result and fpcompare(a[i], l[i], digits) File "/home/krishna/local/inst/pygsl-0.3.2/tests/gsl_test.py", line 24, in fpcompare res1 = (fcmp(a, b.real, eps) == 0) TypeError: argument number 1: a 'double' is expected, 'complex128scalar((-120.5+17.29j))' is received . . . ---------------------------------------------------------------------- Ran 46 tests in 0.242s FAILED (errors=10) |