Skip to content

Commit

Permalink
Merge branch 'Fix_ArrayQ' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Li-Xiang-Ideal authored Dec 14, 2023
2 parents 810f427 + e16f3c2 commit 011cd72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion mathics/builtin/testing_expressions/equality_inequality.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
8 changes: 8 additions & 0 deletions mathics/builtin/testing_expressions/list_oriented.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 011cd72

Please sign in to comment.