From: Michael Orlitzky Date: Fri, 22 Nov 2024 18:53:10 +0000 (-0500) Subject: mjo/eja/eja_utils.py: replace deprecated is_Matrix() X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6536056a7a8933a0add251ad803da277eb8ae7f0;p=sage.d.git mjo/eja/eja_utils.py: replace deprecated is_Matrix() --- 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