Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArrayQ #6

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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):
Expand Down Expand Up @@ -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)

Expand Down
Loading