matchpy icon indicating copy to clipboard operation
matchpy copied to clipboard

A library for pattern matching on symbolic expressions in Python.

Results 18 matchpy issues
Sort by recently updated
recently updated
newest added

Mathematica has [FreeQ](https://reference.wolfram.com/language/ref/FreeQ.html) to test whether an expression contains a symbol. This is very useful in pattern matching for equations as you can specify that, for example, in `a *...

When using the `optional=value` argument in _Wildcard_, one can specify which value to get in case no matching is found. The value has to be given for every wildcard. In...

enhancement

Calling `sorted( )` in https://github.com/HPAC/matchpy/blob/5cae3f275e3a1f725518516bf3c700dc3be03a56/matchpy/functions.py#L87 fails with SymPy, as SymPy objects are not comparable with operators (`=`). Operators are overloaded in SymPy to create instances of inequality objects. SymPy has...

I have translated some parts of MatchPy into C++. I am finding difficulties implementing the type `Union[TLeft, TRight]`. I could use C++17 and `variant`, but this would break compatibility with...

enhancement

How MatchPy manages patterns that match multiple rules. In rubi module of sympy , it results in recursion errors. Is there any way to handle the recursion errors ?

enhancement

Would it be possible to have a wildcard that matches any number of symbols? Right now I am doing this by matching any number of items and having a custom...

enhancement

Is there any way to match a function with a certain number of arguments? Suppose I've defined a binary function `sum`, is there a way to create a pattern `f(a,...

enhancement

In one-to-one matching, symbols that have a `variable_name` do not work in commutative functions. They seem to work correctly in many-to-one matching. Example: ```python from matchpy import Operation, Symbol, Arity,...

bug

### ANNOUNCEMENT: I have ported parts of MatchPy into C++: https://github.com/symengine/symengine/pull/1497 - `symengine` library has been used for expression trees, - only the parts of MatchPy needed by the generated...

To avoid issues such as #60, we should check that objects are created and functions are used correctly, at least in those cases where so far, incorrect input does not...

enhancement