-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Calling sorted( ) in
Line 87 in 5cae3f2
| new_operands.extend(sorted(result)) |
fails with SymPy, as SymPy objects are not comparable with operators (
<, <=, >, >=). Operators are overloaded in SymPy to create instances of inequality objects.
SymPy has a function called default_sort_key meant to deal with this problem:
from sympy import symbols
x, y, z = symbols("x y z")
from sympy.core.compatibility import default_sort_key
sorted([z, x, y], key=default_sort_key)The question is, is it possible to modify MatchPy to specify a custom sorting key so that SymPy can specify the way its objects should be sorted?
Or is it an issue with Multiset?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels