rgwfuncs 0.0.29__tar.gz → 0.0.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.29
3
+ Version: 0.0.30
4
4
  Summary: A functional programming paradigm for mathematical modelling and data science
5
5
  Home-page: https://github.com/ryangerardwilson/rgwfunc
6
6
  Author: Ryan Gerard Wilson
@@ -154,7 +154,47 @@ Print a list of available function names in alphabetical order. If a filter is p
154
154
 
155
155
  This section provides comprehensive functions for handling algebraic expressions, performing tasks such as computation, simplification, solving equations, and prime factorization, all outputted in LaTeX format.
156
156
 
157
- ### 1. `compute_constant_expression`
157
+ ### 1. `python_polynomial_expression_to_latex`
158
+
159
+ Converts a polynomial expression written in Python syntax to a LaTeX formatted string. This function parses algebraic expressions provided as strings using Python’s syntax and translates them into equivalent LaTeX representations, making them suitable for academic or professional documentation. The function supports inclusion of named variables, with an option to substitute specific values into the expression.
160
+
161
+ • Parameters:
162
+ - `expression` (str): The algebraic expression to convert to LaTeX. This should be a string formatted with Python syntax acceptable by SymPy.
163
+ - `subs` (Optional[Dict[str, float]]): An optional dictionary of substitutions where the keys are variable names in the expression, and the values are the numbers with which to substitute those variables.
164
+
165
+ • Returns:
166
+ - `str`: The LaTeX formatted string equivalent to the provided expression.
167
+
168
+ • Raises:
169
+ - `ValueError`: If the expression cannot be parsed due to syntax errors.
170
+
171
+ • Example:
172
+
173
+ from rgwfuncs import python_polynomial_expression_to_latex
174
+
175
+ # Convert a simple polynomial expression to LaTeX format
176
+ latex_result1 = python_polynomial_expression_to_latex("x**2 + y**2")
177
+ print(latex_result1) # Output: "x^{2} + y^{2}"
178
+
179
+ # Convert polynomial expression with substituted values
180
+ latex_result2 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3, "y": 4})
181
+ print(latex_result2) # Output: "25"
182
+
183
+ # Another example with partial substitution
184
+ latex_result3 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3})
185
+ print(latex_result3) # Output: "y^{2} + 9"
186
+
187
+ # Trigonometric functions included with symbolic variables
188
+ latex_result4 = python_polynomial_expression_to_latex("sin(x+z**2) + cos(y)", {"x": 55})
189
+ print(latex_result4) # Output: "cos y + sin \\left(z^{2} + 55\\right)"
190
+
191
+ # Simplified trigonometric functions example with substitution
192
+ latex_result5 = python_polynomial_expression_to_latex("sin(x) + cos(y)", {"x": 0})
193
+ print(latex_result5) # Output: "cos y"
194
+
195
+ --------------------------------------------------------------------------------
196
+
197
+ ### 2. `compute_constant_expression`
158
198
 
159
199
  Computes the numerical result of a given expression, which can evaluate to a constant, represented as a float. Evaluates an constant expression provided as a string and returns the computed result. Supports various arithmetic operations, including addition, subtraction, multiplication, division, and modulo, as well as mathematical functions from the math module.
160
200
 
@@ -178,7 +218,7 @@ Computes the numerical result of a given expression, which can evaluate to a con
178
218
 
179
219
  --------------------------------------------------------------------------------
180
220
 
181
- ### 2. `simplify_polynomial_expression`
221
+ ### 3. `simplify_polynomial_expression`
182
222
 
183
223
  Simplifies an algebraic expression in polynomial form and returns it in LaTeX format. Takes an algebraic expression, in polynomial form, written in Python syntax and simplifies it. The result is returned as a LaTeX formatted string, suitable for academic or professional documentation.
184
224
 
@@ -211,7 +251,7 @@ Simplifies an algebraic expression in polynomial form and returns it in LaTeX fo
211
251
 
212
252
  --------------------------------------------------------------------------------
213
253
 
214
- ### 3. `solve_homogeneous_polynomial_expression`
254
+ ### 4. `solve_homogeneous_polynomial_expression`
215
255
 
216
256
  Solves a homogeneous polynomial expression for a specified variable and returns solutions in LaTeX format. Assumes that the expression is homoegeneous (i.e. equal to zero), and solves for a designated variable. May optionally include substitutions for other variables in the equation. The solutions are provided as a LaTeX formatted string. The method solves equations for specified variables, with optional substitutions, returning LaTeX-formatted solutions.
217
257
 
@@ -234,7 +274,7 @@ Solves a homogeneous polynomial expression for a specified variable and returns
234
274
 
235
275
  --------------------------------------------------------------------------------
236
276
 
237
- ### 4. `get_prime_factors_latex`
277
+ ### 5. `get_prime_factors_latex`
238
278
 
239
279
  Computes prime factors of a number and presents them in LaTeX format.
240
280
 
@@ -258,7 +298,7 @@ Computes prime factors of a number and presents them in LaTeX format.
258
298
 
259
299
  --------------------------------------------------------------------------------
260
300
 
261
- ### 5. `compute_matrix_expression`
301
+ ### 6. `compute_matrix_expression`
262
302
 
263
303
  Computes the results of expressions containing 1D or 2D matrix operations and formats them as LaTeX strings.
264
304
 
@@ -286,7 +326,7 @@ Computes the results of expressions containing 1D or 2D matrix operations and fo
286
326
 
287
327
  --------------------------------------------------------------------------------
288
328
 
289
- ### 6. `compute_ordered_series_expression`
329
+ ### 7. `compute_ordered_series_expression`
290
330
 
291
331
  Computes the result of expressions containing operations on ordered series expressed as 1D lists. The syntax of the expression supports the discrete difference operator via the `ddd()` method.
292
332
 
@@ -128,7 +128,47 @@ Print a list of available function names in alphabetical order. If a filter is p
128
128
 
129
129
  This section provides comprehensive functions for handling algebraic expressions, performing tasks such as computation, simplification, solving equations, and prime factorization, all outputted in LaTeX format.
130
130
 
131
- ### 1. `compute_constant_expression`
131
+ ### 1. `python_polynomial_expression_to_latex`
132
+
133
+ Converts a polynomial expression written in Python syntax to a LaTeX formatted string. This function parses algebraic expressions provided as strings using Python’s syntax and translates them into equivalent LaTeX representations, making them suitable for academic or professional documentation. The function supports inclusion of named variables, with an option to substitute specific values into the expression.
134
+
135
+ • Parameters:
136
+ - `expression` (str): The algebraic expression to convert to LaTeX. This should be a string formatted with Python syntax acceptable by SymPy.
137
+ - `subs` (Optional[Dict[str, float]]): An optional dictionary of substitutions where the keys are variable names in the expression, and the values are the numbers with which to substitute those variables.
138
+
139
+ • Returns:
140
+ - `str`: The LaTeX formatted string equivalent to the provided expression.
141
+
142
+ • Raises:
143
+ - `ValueError`: If the expression cannot be parsed due to syntax errors.
144
+
145
+ • Example:
146
+
147
+ from rgwfuncs import python_polynomial_expression_to_latex
148
+
149
+ # Convert a simple polynomial expression to LaTeX format
150
+ latex_result1 = python_polynomial_expression_to_latex("x**2 + y**2")
151
+ print(latex_result1) # Output: "x^{2} + y^{2}"
152
+
153
+ # Convert polynomial expression with substituted values
154
+ latex_result2 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3, "y": 4})
155
+ print(latex_result2) # Output: "25"
156
+
157
+ # Another example with partial substitution
158
+ latex_result3 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3})
159
+ print(latex_result3) # Output: "y^{2} + 9"
160
+
161
+ # Trigonometric functions included with symbolic variables
162
+ latex_result4 = python_polynomial_expression_to_latex("sin(x+z**2) + cos(y)", {"x": 55})
163
+ print(latex_result4) # Output: "cos y + sin \\left(z^{2} + 55\\right)"
164
+
165
+ # Simplified trigonometric functions example with substitution
166
+ latex_result5 = python_polynomial_expression_to_latex("sin(x) + cos(y)", {"x": 0})
167
+ print(latex_result5) # Output: "cos y"
168
+
169
+ --------------------------------------------------------------------------------
170
+
171
+ ### 2. `compute_constant_expression`
132
172
 
133
173
  Computes the numerical result of a given expression, which can evaluate to a constant, represented as a float. Evaluates an constant expression provided as a string and returns the computed result. Supports various arithmetic operations, including addition, subtraction, multiplication, division, and modulo, as well as mathematical functions from the math module.
134
174
 
@@ -152,7 +192,7 @@ Computes the numerical result of a given expression, which can evaluate to a con
152
192
 
153
193
  --------------------------------------------------------------------------------
154
194
 
155
- ### 2. `simplify_polynomial_expression`
195
+ ### 3. `simplify_polynomial_expression`
156
196
 
157
197
  Simplifies an algebraic expression in polynomial form and returns it in LaTeX format. Takes an algebraic expression, in polynomial form, written in Python syntax and simplifies it. The result is returned as a LaTeX formatted string, suitable for academic or professional documentation.
158
198
 
@@ -185,7 +225,7 @@ Simplifies an algebraic expression in polynomial form and returns it in LaTeX fo
185
225
 
186
226
  --------------------------------------------------------------------------------
187
227
 
188
- ### 3. `solve_homogeneous_polynomial_expression`
228
+ ### 4. `solve_homogeneous_polynomial_expression`
189
229
 
190
230
  Solves a homogeneous polynomial expression for a specified variable and returns solutions in LaTeX format. Assumes that the expression is homoegeneous (i.e. equal to zero), and solves for a designated variable. May optionally include substitutions for other variables in the equation. The solutions are provided as a LaTeX formatted string. The method solves equations for specified variables, with optional substitutions, returning LaTeX-formatted solutions.
191
231
 
@@ -208,7 +248,7 @@ Solves a homogeneous polynomial expression for a specified variable and returns
208
248
 
209
249
  --------------------------------------------------------------------------------
210
250
 
211
- ### 4. `get_prime_factors_latex`
251
+ ### 5. `get_prime_factors_latex`
212
252
 
213
253
  Computes prime factors of a number and presents them in LaTeX format.
214
254
 
@@ -232,7 +272,7 @@ Computes prime factors of a number and presents them in LaTeX format.
232
272
 
233
273
  --------------------------------------------------------------------------------
234
274
 
235
- ### 5. `compute_matrix_expression`
275
+ ### 6. `compute_matrix_expression`
236
276
 
237
277
  Computes the results of expressions containing 1D or 2D matrix operations and formats them as LaTeX strings.
238
278
 
@@ -260,7 +300,7 @@ Computes the results of expressions containing 1D or 2D matrix operations and fo
260
300
 
261
301
  --------------------------------------------------------------------------------
262
302
 
263
- ### 6. `compute_ordered_series_expression`
303
+ ### 7. `compute_ordered_series_expression`
264
304
 
265
305
  Computes the result of expressions containing operations on ordered series expressed as 1D lists. The syntax of the expression supports the discrete difference operator via the `ddd()` method.
266
306
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rgwfuncs"
7
- version = "0.0.29"
7
+ version = "0.0.30"
8
8
  authors = [
9
9
  { name = "Ryan Gerard Wilson", email = "ryangerardwilson@gmail.com" },
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = rgwfuncs
3
- version = 0.0.29
3
+ version = 0.0.30
4
4
  author = Ryan Gerard Wilson
5
5
  author_email = ryangerardwilson@gmail.com
6
6
  description = A functional programming paradigm for mathematical modelling and data science
@@ -1,7 +1,7 @@
1
1
  # This file is automatically generated
2
2
  # Dynamically importing functions from modules
3
3
 
4
- from .algebra_lib import compute_constant_expression, compute_matrix_expression, compute_ordered_series_expression, get_prime_factors_latex, simplify_polynomial_expression, solve_homogeneous_polynomial_expression
4
+ from .algebra_lib import compute_constant_expression, compute_matrix_expression, compute_ordered_series_expression, get_prime_factors_latex, python_polynomial_expression_to_latex, simplify_polynomial_expression, solve_homogeneous_polynomial_expression
5
5
  from .df_lib import append_columns, append_percentile_classification_column, append_ranged_classification_column, append_ranged_date_classification_column, append_rows, append_xgb_labels, append_xgb_logistic_regression_predictions, append_xgb_regression_predictions, bag_union_join, bottom_n_unique_values, cascade_sort, delete_rows, drop_duplicates, drop_duplicates_retain_first, drop_duplicates_retain_last, filter_dataframe, filter_indian_mobiles, first_n_rows, from_raw_data, insert_dataframe_in_sqlite_database, last_n_rows, left_join, limit_dataframe, load_data_from_path, load_data_from_query, load_data_from_sqlite_path, mask_against_dataframe, mask_against_dataframe_converse, numeric_clean, order_columns, print_correlation, print_dataframe, print_memory_usage, print_n_frequency_cascading, print_n_frequency_linear, rename_columns, retain_columns, right_join, send_data_to_email, send_data_to_slack, send_dataframe_via_telegram, sync_dataframe_to_sqlite_database, top_n_unique_values, union_join, update_rows
6
6
  from .docs_lib import docs
7
7
  from .str_lib import send_telegram_message
@@ -4,6 +4,9 @@ import ast
4
4
  # import numpy as np
5
5
  from sympy import symbols, latex, simplify, solve, diff, Expr
6
6
  from sympy.parsing.sympy_parser import parse_expr
7
+ from sympy import __all__ as sympy_functions
8
+ from sympy.parsing.sympy_parser import (standard_transformations, implicit_multiplication_application)
9
+
7
10
  from typing import Tuple, List, Dict, Optional
8
11
 
9
12
 
@@ -37,6 +40,67 @@ def compute_constant_expression(expression: str) -> float:
37
40
  raise ValueError(f"Error computing expression: {e}")
38
41
 
39
42
 
43
+ def python_polynomial_expression_to_latex(
44
+ expression: str,
45
+ subs: Optional[Dict[str, float]] = None
46
+ ) -> str:
47
+ """
48
+ Converts a polynomial expression written in Python syntax to LaTeX format.
49
+
50
+ This function takes an algebraic expression written in Python syntax and converts it
51
+ to a LaTeX formatted string. The expression is assumed to be in terms acceptable by
52
+ sympy, with named variables, and optionally includes substitutions for variables.
53
+
54
+ Parameters:
55
+ expression (str): The algebraic expression to convert to LaTeX. The expression should
56
+ be written using Python syntax.
57
+ subs (Optional[Dict[str, float]]): An optional dictionary of substitutions for variables
58
+ in the expression.
59
+
60
+ Returns:
61
+ str: The expression represented as a LaTeX string.
62
+
63
+ Raises:
64
+ ValueError: If the expression cannot be parsed due to syntax errors.
65
+ """
66
+
67
+ transformations = standard_transformations + (implicit_multiplication_application,)
68
+
69
+ def parse_and_convert_expression(expr_str: str, sym_vars: Dict[str, Expr]) -> Expr:
70
+ try:
71
+ # Parse with transformations to handle implicit multiplication
72
+ expr = parse_expr(expr_str, local_dict=sym_vars, transformations=transformations)
73
+ if subs:
74
+ subs_symbols = {symbols(k): v for k, v in subs.items()}
75
+ expr = expr.subs(subs_symbols)
76
+ return expr
77
+ except (SyntaxError, ValueError, TypeError) as e:
78
+ raise ValueError(f"Error parsing expression: {expr_str}. Error: {e}")
79
+
80
+ # Extract variable names used in the expression
81
+ variable_names = set(re.findall(r'\b[a-zA-Z]\w*\b', expression))
82
+ sym_vars = {var: symbols(var) for var in variable_names}
83
+
84
+ # Import all general function names from SymPy into local scope
85
+
86
+ # Dynamically add SymPy functions to the symbol dictionary
87
+ for func_name in sympy_functions:
88
+ try:
89
+ candidate = globals().get(func_name) or locals().get(func_name)
90
+ if callable(candidate): # Ensure it's actually a callable
91
+ sym_vars[func_name] = candidate
92
+ except KeyError:
93
+ continue # Skip any non-callable or unavailable items
94
+
95
+ # Attempt to parse the expression
96
+ expr = parse_and_convert_expression(expression, sym_vars)
97
+
98
+ # Convert the expression to LaTeX format
99
+ latex_result = latex(expr)
100
+ return latex_result
101
+
102
+
103
+
40
104
  def simplify_polynomial_expression(
41
105
  expression: str,
42
106
  subs: Optional[Dict[str, float]] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.29
3
+ Version: 0.0.30
4
4
  Summary: A functional programming paradigm for mathematical modelling and data science
5
5
  Home-page: https://github.com/ryangerardwilson/rgwfunc
6
6
  Author: Ryan Gerard Wilson
@@ -154,7 +154,47 @@ Print a list of available function names in alphabetical order. If a filter is p
154
154
 
155
155
  This section provides comprehensive functions for handling algebraic expressions, performing tasks such as computation, simplification, solving equations, and prime factorization, all outputted in LaTeX format.
156
156
 
157
- ### 1. `compute_constant_expression`
157
+ ### 1. `python_polynomial_expression_to_latex`
158
+
159
+ Converts a polynomial expression written in Python syntax to a LaTeX formatted string. This function parses algebraic expressions provided as strings using Python’s syntax and translates them into equivalent LaTeX representations, making them suitable for academic or professional documentation. The function supports inclusion of named variables, with an option to substitute specific values into the expression.
160
+
161
+ • Parameters:
162
+ - `expression` (str): The algebraic expression to convert to LaTeX. This should be a string formatted with Python syntax acceptable by SymPy.
163
+ - `subs` (Optional[Dict[str, float]]): An optional dictionary of substitutions where the keys are variable names in the expression, and the values are the numbers with which to substitute those variables.
164
+
165
+ • Returns:
166
+ - `str`: The LaTeX formatted string equivalent to the provided expression.
167
+
168
+ • Raises:
169
+ - `ValueError`: If the expression cannot be parsed due to syntax errors.
170
+
171
+ • Example:
172
+
173
+ from rgwfuncs import python_polynomial_expression_to_latex
174
+
175
+ # Convert a simple polynomial expression to LaTeX format
176
+ latex_result1 = python_polynomial_expression_to_latex("x**2 + y**2")
177
+ print(latex_result1) # Output: "x^{2} + y^{2}"
178
+
179
+ # Convert polynomial expression with substituted values
180
+ latex_result2 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3, "y": 4})
181
+ print(latex_result2) # Output: "25"
182
+
183
+ # Another example with partial substitution
184
+ latex_result3 = python_polynomial_expression_to_latex("x**2 + y**2", {"x": 3})
185
+ print(latex_result3) # Output: "y^{2} + 9"
186
+
187
+ # Trigonometric functions included with symbolic variables
188
+ latex_result4 = python_polynomial_expression_to_latex("sin(x+z**2) + cos(y)", {"x": 55})
189
+ print(latex_result4) # Output: "cos y + sin \\left(z^{2} + 55\\right)"
190
+
191
+ # Simplified trigonometric functions example with substitution
192
+ latex_result5 = python_polynomial_expression_to_latex("sin(x) + cos(y)", {"x": 0})
193
+ print(latex_result5) # Output: "cos y"
194
+
195
+ --------------------------------------------------------------------------------
196
+
197
+ ### 2. `compute_constant_expression`
158
198
 
159
199
  Computes the numerical result of a given expression, which can evaluate to a constant, represented as a float. Evaluates an constant expression provided as a string and returns the computed result. Supports various arithmetic operations, including addition, subtraction, multiplication, division, and modulo, as well as mathematical functions from the math module.
160
200
 
@@ -178,7 +218,7 @@ Computes the numerical result of a given expression, which can evaluate to a con
178
218
 
179
219
  --------------------------------------------------------------------------------
180
220
 
181
- ### 2. `simplify_polynomial_expression`
221
+ ### 3. `simplify_polynomial_expression`
182
222
 
183
223
  Simplifies an algebraic expression in polynomial form and returns it in LaTeX format. Takes an algebraic expression, in polynomial form, written in Python syntax and simplifies it. The result is returned as a LaTeX formatted string, suitable for academic or professional documentation.
184
224
 
@@ -211,7 +251,7 @@ Simplifies an algebraic expression in polynomial form and returns it in LaTeX fo
211
251
 
212
252
  --------------------------------------------------------------------------------
213
253
 
214
- ### 3. `solve_homogeneous_polynomial_expression`
254
+ ### 4. `solve_homogeneous_polynomial_expression`
215
255
 
216
256
  Solves a homogeneous polynomial expression for a specified variable and returns solutions in LaTeX format. Assumes that the expression is homoegeneous (i.e. equal to zero), and solves for a designated variable. May optionally include substitutions for other variables in the equation. The solutions are provided as a LaTeX formatted string. The method solves equations for specified variables, with optional substitutions, returning LaTeX-formatted solutions.
217
257
 
@@ -234,7 +274,7 @@ Solves a homogeneous polynomial expression for a specified variable and returns
234
274
 
235
275
  --------------------------------------------------------------------------------
236
276
 
237
- ### 4. `get_prime_factors_latex`
277
+ ### 5. `get_prime_factors_latex`
238
278
 
239
279
  Computes prime factors of a number and presents them in LaTeX format.
240
280
 
@@ -258,7 +298,7 @@ Computes prime factors of a number and presents them in LaTeX format.
258
298
 
259
299
  --------------------------------------------------------------------------------
260
300
 
261
- ### 5. `compute_matrix_expression`
301
+ ### 6. `compute_matrix_expression`
262
302
 
263
303
  Computes the results of expressions containing 1D or 2D matrix operations and formats them as LaTeX strings.
264
304
 
@@ -286,7 +326,7 @@ Computes the results of expressions containing 1D or 2D matrix operations and fo
286
326
 
287
327
  --------------------------------------------------------------------------------
288
328
 
289
- ### 6. `compute_ordered_series_expression`
329
+ ### 7. `compute_ordered_series_expression`
290
330
 
291
331
  Computes the result of expressions containing operations on ordered series expressed as 1D lists. The syntax of the expression supports the discrete difference operator via the `ddd()` method.
292
332
 
@@ -7,6 +7,7 @@ import math
7
7
  sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
8
8
 
9
9
  from src.rgwfuncs.algebra_lib import (
10
+ python_polynomial_expression_to_latex,
10
11
  compute_constant_expression,
11
12
  simplify_polynomial_expression,
12
13
  solve_homogeneous_polynomial_expression,
@@ -14,6 +15,27 @@ from src.rgwfuncs.algebra_lib import (
14
15
  compute_ordered_series_expression,
15
16
  get_prime_factors_latex)
16
17
 
18
+ def test_python_polynomial_expression_to_latex():
19
+ test_cases = [
20
+ # Without substitutions
21
+ ("x**2 + y**2", None, r"x^{2} + y^{2}"),
22
+ ("3*a + 4*b", None, r"3 a + 4 b"),
23
+
24
+ # With substitutions
25
+ ("x**2 + y**2", {"x": 3, "y": 4}, r"25"), # Shows substitution but not simplification
26
+ ("x**2 + y**2", {"x": 3}, r"y^{2} + 9"),
27
+ ("a*b + b", {"b": 2}, r"2 a + 2"),
28
+ ("sin(x+z**2) + cos(y)", {"x": 55}, r"cos y + sin \left(z^{2} + 55\right)"),
29
+ ("sin(x) + cos(y)", {"x": 0}, r"cos y")
30
+ ]
31
+
32
+ for expression, subs, expected_output in test_cases:
33
+ output = python_polynomial_expression_to_latex(expression, subs)
34
+ assert output == expected_output, (
35
+ f"Test failed for expression: {expression} with substitutions: {subs}. "
36
+ f"Expected {expected_output}, got {output}"
37
+ )
38
+
17
39
 
18
40
  def test_compute_constant_expression():
19
41
  test_cases = [
File without changes