Status: Accepted
Owner: asmeurer
CC: mattpap
Labels: Type-Defect Priority-Medium Polynomial

New issue 1974 by asmeurer: Poly(1).subs traceback
http://code.google.com/p/sympy/issues/detail?id=1974

Poly(x, x).subs(x, y)
y
Poly(1, x).subs(x, y)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "./sympy/core/basic.py", line 701, in subs
    return self._subs_old_new(old, new)
  File "./sympy/core/cache.py", line 85, in wrapper
    func_cache_it_cache[k] = r = func(*args, **kw_args)
  File "./sympy/core/basic.py", line 710, in _subs_old_new
    return self._eval_subs(old, new)
  File "./sympy/core/basic.py", line 716, in _eval_subs
    return self.func(*[arg._eval_subs(old, new) for arg in self.args])
  File "./sympy/polys/polytools.py", line 476, in __new__
raise GeneratorsNeeded("can't initialize from %s without generators" % rep)
GeneratorsNeeded: can't initialize from 1 without generators

Ideally, subs would also return a Poly again, too, but that's another issue.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to