From bc363252123524267210b66fb32cd5f147d58ff7 Mon Sep 17 00:00:00 2001 From: Li Xiang <54926635+Li-Xiang-Ideal@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:13:48 +0800 Subject: [PATCH 1/2] Update list_oriented.py --- mathics/builtin/testing_expressions/list_oriented.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathics/builtin/testing_expressions/list_oriented.py b/mathics/builtin/testing_expressions/list_oriented.py index 30c0668a3..ef8cd5a10 100644 --- a/mathics/builtin/testing_expressions/list_oriented.py +++ b/mathics/builtin/testing_expressions/list_oriented.py @@ -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) From 41a885bebce9a7bcd95b98e9930063d402078b1a Mon Sep 17 00:00:00 2001 From: Li Xiang <54926635+Li-Xiang-Ideal@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:18:06 +0800 Subject: [PATCH 2/2] Update list_oriented.py --- mathics/builtin/testing_expressions/list_oriented.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathics/builtin/testing_expressions/list_oriented.py b/mathics/builtin/testing_expressions/list_oriented.py index ef8cd5a10..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):