From d64bfa1c4d183f3cf7930b875814b55b01e737e2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Nov 2023 14:51:11 -0800 Subject: [PATCH] src/sage/calculus/expr.py: Move imports from method to module --- src/sage/calculus/expr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sage/calculus/expr.py b/src/sage/calculus/expr.py index 236b46a94d9..0aa62851d24 100644 --- a/src/sage/calculus/expr.py +++ b/src/sage/calculus/expr.py @@ -3,6 +3,9 @@ """ from sage.misc.lazy_import import lazy_import +from sage.structure.element import is_Matrix +from sage.symbolic.expression import Expression +from sage.symbolic.ring import SR lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) lazy_import('sage.matrix.constructor', 'matrix') @@ -163,10 +166,6 @@ def symbolic_expression(x): TypeError: unable to convert to a symbolic expression """ - from sage.structure.element import is_Matrix - from sage.symbolic.expression import Expression - from sage.symbolic.ring import SR - if isinstance(x, Expression): return x elif hasattr(x, '_symbolic_'):