answered 2025-04-19 09:45:41 +0200
This command does the job:
isinstance(A,sage.structure.element.Matrix)