diff --git a/mathics/builtin/testing_expressions/list_oriented.py b/mathics/builtin/testing_expressions/list_oriented.py index 30c0668a3..bc61c0491 100644 --- a/mathics/builtin/testing_expressions/list_oriented.py +++ b/mathics/builtin/testing_expressions/list_oriented.py @@ -8,9 +8,9 @@ from mathics.core.exceptions import InvalidLevelspecError from mathics.core.expression import Expression from mathics.core.symbols import Atom, SymbolFalse, SymbolTrue -from mathics.core.systemsymbols import SymbolSubsetQ # , SymbolSparseArray +from mathics.core.systemsymbols import SymbolSparseArray, SymbolSubsetQ from mathics.eval.parts import python_levelspec -from mathics.eval.testing_expressions import check_ArrayQ # , check_SparseArrayQ +from mathics.eval.testing_expressions import check_ArrayQ, check_SparseArrayQ class ArrayQ(Builtin): @@ -59,8 +59,8 @@ class ArrayQ(Builtin): def eval(self, expr, pattern, test, evaluation: Evaluation): "ArrayQ[expr_, pattern_, test_]" - # if not isinstance(expr, Atom) and expr.head.sameQ(SymbolSparseArray): - # return check_SparseArrayQ(expr, pattern, test, evaluation) + if not isinstance(expr, Atom) and expr.head.sameQ(SymbolSparseArray): + return check_SparseArrayQ(expr, pattern, test, evaluation) return check_ArrayQ(expr, pattern, test, evaluation)