> update, I got this to work, just needed to use the classmethod strip()
> instead of the one in the string module. Did some other fixes (it's in
> my repo), but now I am blocked on this:
>
>
> >>> import sympy
> Traceback (most recent call last):
> File "sympy/core/decorators.py", line 73, in __sympifyit_wrapper
> return func(a, b)
> File "sympy/core/basic.py", line 662, in __rmul__
> return Mul(other, self)
> File "sympy/core/cache.py", line 82, in wrapper
> return func_cache_it_cache[k]
> TypeError: unhashable type: 'Integer'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "sympy/__init__.py", line 25, in <module>
> from .polys import *
> File "sympy/polys/__init__.py", line 2, in <module>
> from .monomial import monomials, monomial_count
> File "sympy/polys/monomial.py", line 6, in <module>
> from sympy.functions import factorial
> File "sympy/functions/__init__.py", line 11, in <module>
> from . import special
> File "sympy/functions/special/__init__.py", line 8, in <module>
> from . import polynomials
> File "sympy/functions/special/polynomials.py", line 102, in <module>
> class chebyshevu(PolynomialSequence):
> File "sympy/functions/special/polynomials.py", line 121, in chebyshevu
> @recurrence_memo([S.One, 2*_x])
> File "sympy/core/decorators.py", line 100, in __sympifyit_wrapper
> return func(a, b)
> File "sympy/core/basic.py", line 662, in __rmul__
> return Mul(other, self)
> File "sympy/core/cache.py", line 82, in wrapper
> return func_cache_it_cache[k]
> TypeError: unhashable type: 'Integer'
Ok, I am now at the same error with my repo too (py3-3 branch).
I investigated this a bit and it's a bit weird --- hash(Rational(3,
2)) works, but not hash(Integer(3)). Anyway, a workaround for the time
being is not to use cache, then the error is:
$ SYMPY_USE_CACHE=no python3.1 -c "import sympy"
Traceback (most recent call last):
File "sympy/core/decorators.py", line 73, in __sympifyit_wrapper
return func(a, b)
File "sympy/core/basic.py", line 663, in __rmul__
return Mul(other, self)
File "sympy/core/operations.py", line 32, in __new__
c_part, nc_part, order_symbols = cls.flatten(list(map(_sympify, args)))
File "sympy/core/mul.py", line 303, in flatten
c_part.sort(Basic.compare)
TypeError: must use keyword argument for key function
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "sympy/__init__.py", line 25, in <module>
from .polys import *
File "sympy/polys/__init__.py", line 2, in <module>
from .monomial import monomials, monomial_count
File "sympy/polys/monomial.py", line 6, in <module>
from sympy.functions import factorial
File "sympy/functions/__init__.py", line 11, in <module>
from . import special
File "sympy/functions/special/__init__.py", line 8, in <module>
from . import polynomials
File "sympy/functions/special/polynomials.py", line 102, in <module>
class chebyshevu(PolynomialSequence):
File "sympy/functions/special/polynomials.py", line 121, in chebyshevu
@recurrence_memo([S.One, 2*_x])
File "sympy/core/decorators.py", line 100, in __sympifyit_wrapper
return func(a, b)
File "sympy/core/basic.py", line 663, in __rmul__
return Mul(other, self)
File "sympy/core/operations.py", line 32, in __new__
c_part, nc_part, order_symbols = cls.flatten(list(map(_sympify, args)))
File "sympy/core/mul.py", line 303, in flatten
c_part.sort(Basic.compare)
TypeError: must use keyword argument for key function
so some more fixes with regards to .sort() and cmp are needed, I'll
give it a shot soon, I think all those are some small things that
should be easy to fix.
Ondrej
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy" 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?hl=en
-~----------~----~----~----~------~----~------~--~---