| Issue 158: | nstr should pass kwargs to low-level conversion methods |
1 of 74
Next ›
|
| 1 person starred this issue and may be notified of changes. | Back to list |
This patch implementes this, however I get an infinite recursion when running the linalg.py tests. |
|
,
Aug 19, 2009
Test script to demonstrate new functionality. |
|
,
Aug 22, 2009
+1 if the infinite recursion can be fixed |
|
,
Nov 07, 2009
The error occurs in test_exp_pade, I managed to recover the stacktrace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mpmath/__init__.py", line 96, in runtests
tests.testit(importdir, testdir)
File "mpmath/tests/runtests.py", line 118, in testit
module.__dict__[f]()
File "/home/one/src/mpmath/mpmath/tests/test_linalg.py", line 226, in test_exp_pade
e1 = exp_pade(a1)
File "mpmath/linalg.py", line 521, in exp_pade
cx = c*x
File "<string>", line 28, in __mul__
File "<string>", line 28, in __mul__
[...]
File "<string>", line 28, in __mul__
File "mpmath/mptypes.py", line 377, in convert
return matrix(x)
File "mpmath/matrices.py", line 324, in __init__
A = args[0].copy()
File "mpmath/matrices.py", line 584, in copy
new = matrix(self.__rows, self.__cols, force_type=self.force_type)
File "mpmath/matrices.py", line 299, in __init__
if isinstance(args[0], (list, tuple)):
RuntimeError: maximum recursion depth exceeded while calling a Python object
This is quite strange, how can a commit related to nstr() affect matrix multiplication?
|
|
,
Nov 07, 2009
To reproduce, run: >>> import sys >>> sys.setrecursionlimit(100) >>> from mpmath import randmatrix >>> from mpmath.linalg import exp_pade >>> exp_pade(randmatrix(2)) |
|
|
|