summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--polymatrix/expression/utils/getvariableindices.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/polymatrix/expression/utils/getvariableindices.py b/polymatrix/expression/utils/getvariableindices.py
index aebdeb0..d87f82e 100644
--- a/polymatrix/expression/utils/getvariableindices.py
+++ b/polymatrix/expression/utils/getvariableindices.py
@@ -3,15 +3,17 @@ import typing
from polymatrix.expressionstate.abc import ExpressionState
from polymatrix.expression.mixins.expressionbasemixin import ExpressionBaseMixin
+from polymatrix.utils.deprecation import deprecated
# NP: very confusing name without explaination / context
# NP: why is this not a feature of expressionstate?
-# FIXME: typing, especially return type
+@deprecated("Replaced by helper methods in ExpressionState")
def get_variable_indices_from_variable(
state: ExpressionState,
variable: ExpressionBaseMixin | int | typing.Any,
) -> tuple[int, ...] | None:
+
if isinstance(variable, ExpressionBaseMixin):
state, variable_polynomial = variable.apply(state)
@@ -50,7 +52,7 @@ def get_variable_indices_from_variable(
return state, variable_indices
-# not used, remove?
+@deprecated("Replaced by helper methods in ExpressionState")
def get_variable_indices(state, variables):
if not isinstance(variables, tuple):
variables = (variables,)