diff --git a/mathics/builtin/testing_expressions/equality_inequality.py b/mathics/builtin/testing_expressions/equality_inequality.py index bf339dcc7..9b193f7f1 100644 --- a/mathics/builtin/testing_expressions/equality_inequality.py +++ b/mathics/builtin/testing_expressions/equality_inequality.py @@ -253,7 +253,6 @@ def eval_other(self, args, evaluation): class _MinMax(Builtin): - attributes = ( A_FLAT | A_NUMERIC_FUNCTION | A_ONE_IDENTITY | A_ORDERLESS | A_PROTECTED ) diff --git a/mathics/builtin/testing_expressions/list_oriented.py b/mathics/builtin/testing_expressions/list_oriented.py index b2f819331..30c0668a3 100644 --- a/mathics/builtin/testing_expressions/list_oriented.py +++ b/mathics/builtin/testing_expressions/list_oriented.py @@ -39,6 +39,14 @@ class ArrayQ(Builtin): = False >> ArrayQ[{{a, b}, {c, d}}, 2, SymbolQ] = True + + ArrayQ works on sparse arrays: + >> ArrayQ[SparseArray[{{1, 2} -> a, {2, 1} -> b}]] + = True + + For sparse arrays, ArrayQ tests not only specified values, but also default value 0: + >> ArrayQ[SparseArray[{{1, 2} -> a, {2, 1} -> b}], 2, SymbolQ] + = False """ rules = {