From 6536056a7a8933a0add251ad803da277eb8ae7f0 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 22 Nov 2024 13:53:10 -0500 Subject: [PATCH] mjo/eja/eja_utils.py: replace deprecated is_Matrix() --- mjo/eja/eja_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mjo/eja/eja_utils.py b/mjo/eja/eja_utils.py index a8abeff..a497044 100644 --- a/mjo/eja/eja_utils.py +++ b/mjo/eja/eja_utils.py @@ -1,5 +1,3 @@ -from sage.structure.element import is_Matrix - def _scale(x, alpha): r""" Scale the vector, matrix, or cartesian-product-of-those-things @@ -113,7 +111,8 @@ def _all2list(x): # because vectors can only contain ring elements as entries. return x.to_vector().list() - if is_Matrix(x): + from sage.structure.element import Matrix + if isinstance(x, Matrix): # This sucks, but for performance reasons we don't want to # call _all2list recursively on the contents of a matrix # when we don't have to (they only contain ring elements -- 2.49.0