Skip to content

Commit 573a226

Browse files
authored
Remove use of deprecated sympy.core.compatibility module (#81)
1 parent c4324c3 commit 573a226

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pymare/effectsize/expressions.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
from pathlib import Path
66

77
from sympy import Symbol, sympify
8-
from sympy.core.compatibility import exec_
9-
10-
_locals = {}
11-
exec_("from sympy.stats import *", _locals)
128

139

1410
class Expression:
@@ -26,9 +22,12 @@ class Expression:
2622
"""
2723

2824
def __init__(self, expression, description=None, type=0):
25+
self._locals = {}
26+
exec("from sympy.stats import *", self._locals)
27+
2928
self.expr = expression
3029
self.description = description
31-
self.sympy = sympify(expression, locals=_locals)
30+
self.sympy = sympify(expression, locals=self._locals)
3231
self.type = type
3332
self.symbols = self.sympy.free_symbols
3433

0 commit comments

Comments
 (0)