Skip to content

Commit dbdb522

Browse files
committed
Remove extraneous changes
1 parent efcb056 commit dbdb522

File tree

5 files changed

+11
-82
lines changed

5 files changed

+11
-82
lines changed

SYMBOLS_MANIFEST.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,6 @@ System`NumberQ
845845
System`NumberString
846846
System`Numerator
847847
System`NumericFunction
848-
System`NumericArray
849848
System`NumericQ
850849
System`O
851850
System`Octahedron

mathics/builtin/list/constructing.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
from typing import Optional, Tuple
1414

1515
from mathics.builtin.box.layout import RowBox
16-
from mathics.core.atoms import ByteArray, Integer, Integer1, is_integer_rational_or_real, NumericArray
16+
from mathics.core.atoms import ByteArray, Integer, Integer1, is_integer_rational_or_real
1717
from mathics.core.attributes import A_HOLD_FIRST, A_LISTABLE, A_LOCKED, A_PROTECTED
1818
from mathics.core.builtin import BasePattern, Builtin, IterationFunction
1919
from mathics.core.convert.expression import to_expression
20-
from mathics.core.convert.python import from_python
2120
from mathics.core.convert.sympy import from_sympy
2221
from mathics.core.element import ElementsProperties
2322
from mathics.core.evaluation import Evaluation
@@ -199,14 +198,8 @@ class Normal(Builtin):
199198
def eval_general(self, expr: Expression, evaluation: Evaluation):
200199
"Normal[expr_]"
201200
if isinstance(expr, Atom):
202-
if hasattr(expr, "items"):
203-
def normal(items):
204-
return ListExpression(*(
205-
normal(item.items) if isinstance(item, Atom) and hasattr(item, "items")
206-
else item
207-
for item in items
208-
))
209-
return normal(expr.items)
201+
if isinstance(expr, ByteArray):
202+
return ListExpression(*expr.items)
210203
return expr
211204
if expr.has_form("RootSum", 2):
212205
return from_sympy(expr.to_sympy().doit(roots=True))

mathics/builtin/list/eol.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -698,24 +698,25 @@ def eval(self, expr, evaluation: Evaluation, expression: Expression):
698698
if not hasattr(expr, "items"):
699699
evaluation.message("First", "normal", Integer1, expression)
700700
return
701-
parts = expr.items
701+
expr_len = len(expr.items)
702702
else:
703-
parts = expr.elements
704-
705-
expr_len = len(parts)
703+
expr_len = len(expr.elements)
706704
if expr_len == 0:
707705
evaluation.message("First", "nofirst", expr)
708706
return
709707

710-
if expr_len > 2 and expr.get_head() is SymbolSequence:
708+
if isinstance(expr, ByteArray):
709+
return expr.items[0]
710+
711+
if expr_len > 2 and expr.head is SymbolSequence:
711712
evaluation.message(
712713
"First", "argt", SymbolFirst, Integer(expr_len), Integer1, Integer2
713714
)
714715
return
715716

716-
first_elem = parts[0]
717+
first_elem = expr.elements[0]
717718

718-
if expr.get_head() == SymbolSequence or (
719+
if expr.head == SymbolSequence or (
719720
not isinstance(expr, ListExpression)
720721
and len == 2
721722
and isinstance(first_elem, Atom)

mathics/builtin/numericarray.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

mathics/core/systemsymbols.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@
179179
SymbolNumberForm = Symbol("System`NumberForm")
180180
SymbolNumberString = Symbol("System`NumberString")
181181
SymbolNumberQ = Symbol("System`NumberQ")
182-
SymbolNumericArray = Symbol("System`NumericArray")
183182
SymbolNumericQ = Symbol("System`NumericQ")
184183
SymbolO = Symbol("System`O")
185184
SymbolOpacity = Symbol("System`Opacity")

0 commit comments

Comments
 (0)