rgwfuncs 0.0.47__tar.gz → 0.0.48__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.
- {rgwfuncs-0.0.47/src/rgwfuncs.egg-info → rgwfuncs-0.0.48}/PKG-INFO +1 -1
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/pyproject.toml +1 -1
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/setup.cfg +1 -1
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/algebra_lib.py +13 -11
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48/src/rgwfuncs.egg-info}/PKG-INFO +1 -1
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/LICENSE +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/README.md +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/__init__.py +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/df_lib.py +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/docs_lib.py +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/interactive_shell_lib.py +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs/str_lib.py +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs.egg-info/SOURCES.txt +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs.egg-info/dependency_links.txt +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs.egg-info/entry_points.txt +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs.egg-info/requires.txt +0 -0
- {rgwfuncs-0.0.47 → rgwfuncs-0.0.48}/src/rgwfuncs.egg-info/top_level.txt +0 -0
@@ -676,31 +676,33 @@ def solve_homogeneous_polynomial_expression(
|
|
676
676
|
ValueError: If the equation cannot be solved due to errors in expression or parameters.
|
677
677
|
"""
|
678
678
|
|
679
|
-
print("679", expression)
|
680
|
-
print("681", variable)
|
681
|
-
print("682", subs)
|
682
679
|
try:
|
683
|
-
|
680
|
+
print("679", expression)
|
681
|
+
print("681", variable)
|
682
|
+
print("682", subs)
|
683
|
+
|
684
684
|
variable_symbols = set(re.findall(r'\b[a-zA-Z]\w*\b', expression))
|
685
685
|
sym_vars = {var: symbols(var) for var in variable_symbols}
|
686
686
|
|
687
|
-
# Parse the expression
|
688
687
|
expr = parse_expr(expression, local_dict=sym_vars)
|
688
|
+
print("Parsed expression:", expr)
|
689
689
|
|
690
|
-
# If substitutions are provided, apply them
|
691
690
|
if subs:
|
692
691
|
expr = expr.subs({symbols(k): v for k, v in subs.items()})
|
692
|
+
print("Expression after substitution:", expr)
|
693
693
|
|
694
|
-
# Ensure the variable is treated as a symbol for solving
|
695
694
|
var_symbol = symbols(variable)
|
696
695
|
|
697
|
-
# Solve for the variable
|
698
696
|
eq = Eq(expr, 0)
|
697
|
+
print("Equation to solve:", eq)
|
698
|
+
|
699
699
|
solutions = solve(eq, var_symbol)
|
700
700
|
|
701
|
-
|
702
|
-
|
703
|
-
|
701
|
+
if solutions:
|
702
|
+
latex_solutions = [latex(simplify(sol)) for sol in solutions]
|
703
|
+
result = r"\left[" + ", ".join(latex_solutions) + r"\right]"
|
704
|
+
else:
|
705
|
+
result = r"\left[\right]"
|
704
706
|
|
705
707
|
print("704", result)
|
706
708
|
return result
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|