Skip to content

Commit abcf694

Browse files
Deprecating lambdify decorator (pyccel#1823)
Deprecated `lambdify` decorator. The decorator is removed from `pyccel/decorators.py` and the tests that use it are removed (`tests/symbolic/scripts/lambdas.py`, and `tests/symbolic/scripts/neural_net.py`) --------- Co-authored-by: EmilyBourne <[email protected]>
1 parent ad5d36c commit abcf694

File tree

4 files changed

+1
-47
lines changed

4 files changed

+1
-47
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ All notable changes to this project will be documented in this file.
6969

7070
### Deprecated
7171

72+
- #1820 : Deprecated unused decorator `@lambdify`
7273
- #1786 : Remove support for `real` and `integer` as type annotations.
7374
- #1812 : Stop allowing multiple main blocks inside a module.
7475
- \[INTERNALS\] Remove property `ast.basic.TypedAstNode.precision`.

pyccel/decorators.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'bypass',
1414
'elemental',
1515
'inline',
16-
'lambdify',
1716
'private',
1817
'pure',
1918
'stack_array',
@@ -22,16 +21,6 @@
2221
'types',
2322
)
2423

25-
def lambdify(f):
26-
27-
args = f.__code__.co_varnames
28-
from sympy import symbols
29-
args = symbols(args)
30-
expr = f(*args)
31-
def wrapper(*vals):
32-
return expr.subs(zip(args,vals)).doit()
33-
34-
return wrapper
3524

3625
def sympy(f):
3726
return f

tests/symbolic/scripts/lambdas.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/symbolic/scripts/neural_net.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)