Skip to content

Commit 364fecf

Browse files
committed
use a less desctructive way to fix symbol missing issue
1 parent 8e10644 commit 364fecf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

mathics/core/convert/sympy.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@
6161
SymbolGreater,
6262
SymbolGreaterEqual,
6363
SymbolIndeterminate,
64-
SymbolIntegers,
64+
SymbolInteger,
6565
SymbolLess,
6666
SymbolLessEqual,
6767
SymbolMatrixPower,
6868
SymbolO,
6969
SymbolPi,
7070
SymbolPiecewise,
71-
SymbolReals,
71+
SymbolReal,
7272
SymbolSlot,
7373
SymbolUnequal,
7474
)
@@ -143,9 +143,9 @@ def apply_domain_to_symbols(symbols: Iterable[sympy.Symbol], domain) -> dict[sym
143143
# it would refuse to solve Abs() when symbol is in Complexes
144144
result = {}
145145
for symbol in symbols:
146-
if domain == SymbolReals:
146+
if domain == SymbolReal:
147147
new_symbol = sympy.Symbol(repr(symbol), real=True)
148-
elif domain == SymbolIntegers:
148+
elif domain == SymbolInteger:
149149
new_symbol = sympy.Symbol(repr(symbol), integer=True)
150150
else:
151151
new_symbol = symbol

mathics/core/systemsymbols.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
SymbolColorQuantize = Symbol("System`ColorQuantize")
5656
SymbolCompile = Symbol("System`Compile")
5757
SymbolCompiledFunction = Symbol("System`CompiledFunction")
58-
SymbolComplex = Symbol("System`Complex")
58+
SymbolComplex = Symbol("System`Complexes")
5959
SymbolComplexes = Symbol("System`Complexes")
6060
SymbolComplexInfinity = Symbol("System`ComplexInfinity")
6161
SymbolCondition = Symbol("System`Condition")
@@ -124,7 +124,7 @@
124124
SymbolInfinity = Symbol("System`Infinity")
125125
SymbolInfix = Symbol("System`Infix")
126126
SymbolInputForm = Symbol("System`InputForm")
127-
SymbolInteger = Symbol("System`Integer")
127+
SymbolInteger = Symbol("System`Integers")
128128
SymbolIntegers = Symbol("System`Integers")
129129
SymbolIntegrate = Symbol("System`Integrate")
130130
SymbolLeft = Symbol("System`Left")
@@ -201,7 +201,7 @@
201201
SymbolRandomReal = Symbol("System`RandomReal")
202202
SymbolRational = Symbol("System`Rational")
203203
SymbolRe = Symbol("System`Re")
204-
SymbolReal = Symbol("System`Real")
204+
SymbolReal = Symbol("System`Reals")
205205
SymbolReals = Symbol("System`Reals")
206206
SymbolRealAbs = Symbol("System`RealAbs")
207207
SymbolRealDigits = Symbol("System`RealDigits")

0 commit comments

Comments
 (0)