Initialisation du repository de Beta
This commit is contained in:
commit
14985f6dbb
9469 changed files with 1903273 additions and 0 deletions
17
venv/lib/python3.12/site-packages/sympy/strategies/util.py
Normal file
17
venv/lib/python3.12/site-packages/sympy/strategies/util.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from sympy.core.basic import Basic
|
||||
|
||||
new = Basic.__new__
|
||||
|
||||
|
||||
def assoc(d, k, v):
|
||||
d = d.copy()
|
||||
d[k] = v
|
||||
return d
|
||||
|
||||
|
||||
basic_fns = {'op': type,
|
||||
'new': Basic.__new__,
|
||||
'leaf': lambda x: not isinstance(x, Basic) or x.is_Atom,
|
||||
'children': lambda x: x.args}
|
||||
|
||||
expr_fns = assoc(basic_fns, 'new', lambda op, *args: op(*args))
|
||||
Loading…
Add table
Add a link
Reference in a new issue