Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed May 24, 2023
1 parent f32ec04 commit 819014a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
13 changes: 3 additions & 10 deletions mathics/eval/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,18 @@
from mathics.core.element import BaseElement, ElementsProperties
from mathics.core.expression import Expression
from mathics.core.number import FP_MANTISA_BINARY_DIGITS, SpecialValueError, min_prec

from mathics.core.rules import Rule
from mathics.core.symbols import Atom, Symbol
from mathics.core.symbols import Atom
from mathics.core.systemsymbols import (
SymbolAbs,
SymbolComplexInfinity,
SymbolE,
SymbolEulerGamma,
SymbolExp,
SymbolI,
SymbolIndeterminate,
SymbolKhinchin,
SymbolLog,
SymbolPi,
SymbolPlus,
SymbolPower,
SymbolSign,
SymbolTimes,
)

# FIXME: replace by numpy constants:
Expand Down Expand Up @@ -221,7 +215,6 @@ def eval_Sign(expr: BaseElement) -> Optional[BaseElement]:
return Expression(SymbolTimes, expr, norm)
return result
return None



def eval_Sign_number(n: Number) -> Number:
Expand Down Expand Up @@ -763,6 +756,7 @@ def eval_inverse_number(n: Number) -> Number:
# Otherwise, use power....
return eval_Power_number(n, IntegerM1)


def eval_multiply_numbers(*numbers: List[Number]) -> Number:
"""
Multiply the elements in ``numbers``.
Expand Down Expand Up @@ -819,8 +813,7 @@ def flat_arithmetic_operators(expr: Expression) -> Expression:
return Expression(head, *items[True], *items[False])



def segregate_numbers(
def segregate_numbers(
*elements: BaseElement,
) -> Tuple[List[Number], List[BaseElement]]:
"""
Expand Down
1 change: 0 additions & 1 deletion mathics/eval/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def extract_exif(image, evaluation: Evaluation) -> Optional[Expression]:
Return None if there is no Exif information.
"""
if hasattr(image, "getexif"):

# PIL seems to have a bug in getting v2_tags,
# specifically tag offsets because
# it expects image.fp to exist and for us it
Expand Down
8 changes: 2 additions & 6 deletions mathics/eval/parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from typing import List

from mathics.core.atoms import Integer, Integer1
from mathics.core.atoms import Integer
from mathics.core.convert.expression import make_expression
from mathics.core.element import BaseElement, BoxElementMixin
from mathics.core.exceptions import (
Expand All @@ -20,11 +20,7 @@
from mathics.core.list import ListExpression
from mathics.core.subexpression import SubExpression
from mathics.core.symbols import Atom, Symbol, SymbolList
from mathics.core.systemsymbols import (
SymbolDirectedInfinity,
SymbolInfinity,
SymbolNothing,
)
from mathics.core.systemsymbols import SymbolInfinity, SymbolNothing
from mathics.eval.patterns import Matcher


Expand Down
1 change: 0 additions & 1 deletion mathics/eval/testing_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def cmp(a, b) -> int:


def do_cmp(x1, x2) -> Optional[int]:

# don't attempt to compare complex numbers
for x in (x1, x2):
# TODO: Send message General::nord
Expand Down

0 comments on commit 819014a

Please sign in to comment.