Skip to content

Commit

Permalink
Deprecating lambdify decorator (#1823)
Browse files Browse the repository at this point in the history
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 <louise.bourne@gmail.com>
  • Loading branch information
elizasorber and EmilyBourne committed Apr 29, 2024
1 parent ad5d36c commit abcf694
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -69,6 +69,7 @@ All notable changes to this project will be documented in this file.

### Deprecated

- #1820 : Deprecated unused decorator `@lambdify`
- #1786 : Remove support for `real` and `integer` as type annotations.
- #1812 : Stop allowing multiple main blocks inside a module.
- \[INTERNALS\] Remove property `ast.basic.TypedAstNode.precision`.
Expand Down
11 changes: 0 additions & 11 deletions pyccel/decorators.py
Expand Up @@ -13,7 +13,6 @@
'bypass',
'elemental',
'inline',
'lambdify',
'private',
'pure',
'stack_array',
Expand All @@ -22,16 +21,6 @@
'types',
)

def lambdify(f):

args = f.__code__.co_varnames
from sympy import symbols
args = symbols(args)
expr = f(*args)
def wrapper(*vals):
return expr.subs(zip(args,vals)).doit()

return wrapper

def sympy(f):
return f
Expand Down
14 changes: 0 additions & 14 deletions tests/symbolic/scripts/lambdas.py

This file was deleted.

22 changes: 0 additions & 22 deletions tests/symbolic/scripts/neural_net.py

This file was deleted.

0 comments on commit abcf694

Please sign in to comment.