diff --git a/mathics/builtin/testing_expressions/list_oriented.py b/mathics/builtin/testing_expressions/list_oriented.py index cd643d618..1f7480690 100644 --- a/mathics/builtin/testing_expressions/list_oriented.py +++ b/mathics/builtin/testing_expressions/list_oriented.py @@ -39,14 +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 - >> ArrayQ[SparseArray[{{1, 2} -> a, {2, 1} -> b}], 1] - = False + + 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 - >> ArrayQ[SparseArray[{{1, 1} -> a, {1, 2} -> b}], 2, SymbolQ] - = True """ rules = {