Skip to content

Commit

Permalink
Fix_ArrayQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Li-Xiang-Ideal committed Dec 12, 2023
1 parent ff1d13f commit 8bb1d27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mathics/builtin/testing_expressions/list_oriented.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8bb1d27

Please sign in to comment.