Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion mathics/builtin/atomic/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def eval_with_base(self, n, b, evaluation, nr_elements=None, pos=None):
if isinstance(n, (Expression, Symbol, Rational)):
pos_len = abs(pos) + 1 if pos is not None and pos < 0 else 1
if nr_elements is not None:
# we can't use eval_n here because we have the two-arguemnt form
# we can't use eval_n here because we have the two-argument form
n = Expression(
SymbolN,
n,
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/atomic/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class HexadecimalCharacter(Builtin):

# This isn't your normal Box class. We'll keep this here rather than
# in mathics.builtin.box for now.
# mmatera commenct: This does not even exist in WMA. \! should be associated
# mmatera comment: This does not even exist in WMA. \! should be associated
# to `ToExpression`, but it was not properly implemented by now...
class InterpretedBox(PrefixOperator):
r"""
Expand Down
1 change: 0 additions & 1 deletion mathics/builtin/box/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ def get_range(min, max):
if width > base_width:
width = base_width
height = width * aspect
height = height

width *= size_multiplier
height *= size_multiplier
Expand Down
3 changes: 1 addition & 2 deletions mathics/builtin/box/graphics3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ def _prepare_elements(self, elements, options, max_width=None):
boxratios = self.graphics_options["System`BoxRatios"].to_python()
if boxratios == "System`Automatic":
boxratios = ["System`Automatic"] * 3
else:
boxratios = boxratios

if not isinstance(boxratios, list) or len(boxratios) != 3:
raise BoxExpressionError

Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/datentime.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ class DateObject(_DateFormat, ImmutableValueMixin):

<dl>
<dt>'DateObject[...]'
<dd> Returns an object codifiyng DateList....
<dd> Returns an object codifying DateList....
</dl>

>> DateObject[{2020, 4, 15}]
Expand Down
4 changes: 2 additions & 2 deletions mathics/builtin/drawing/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class DiscretePlot(_Plot):
"DiscretePlot[expr_, {var_Symbol, nmin_Integer, nmax_Integer}, options___]": "DiscretePlot[expr, {var, nmin, nmax, 1, options}]",
}

summary_text = "discrete plot of a one-paremeter function"
summary_text = "discrete plot of a one-parameter function"

def eval(
self, functions, x, start, nmax, step, evaluation: Evaluation, options: dict
Expand Down Expand Up @@ -1058,7 +1058,7 @@ class ListPlot(_ListPlot):
>> ListPlot[Prime[Range[30]]]
= -Graphics-

seems very roughly to fit a table of quadradic numbers:
seems very roughly to fit a table of quadratic numbers:
>> ListPlot[Table[n ^ 2 / 8, {n, 30}]]
= -Graphics-

Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/files_io/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ class ReadList(Read):
See <url>
:RecordSeparators:
https://reference.wolfram.com/language/ref/RecordSeprators.html</url> \
works analgously for records as 'WordSeparators' does for words.
works analogously for records as 'WordSeparators' does for words.

To allow both periods and newlines as record separators:

Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/intfns/divlike.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def eval_k_n(self, k: Integer, n: Integer, evaluation: Evaluation):

class PowerMod(Builtin):
"""
Modular exponentiaion.
Modular exponentiation.
See <url>https://en.wikipedia.org/wiki/Modular_exponentiation</url>.

<dl>
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/numbers/hyperbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class Gudermannian(Builtin):
"""

# See https://mathworld.wolfram.com/Gudermannian.html for a number
# of relatiions to trigonometric and hyperbolic functions that could be
# of relations to trigonometric and hyperbolic functions that could be
# used if needed.
rules = {
"Gudermannian[Undefined]": "Undefined",
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/numbers/numbertheory.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ContinuedFraction(SympyFunction):
<dd>generate the first $n$ terms in the continued fraction representation of $x$.

<dt>'ContinuedFraction'[$x$]
<dd>the complete continued fraction representation for a rational or quadradic irrational number.
<dd>the complete continued fraction representation for a rational or quadratic irrational number.
</dl>

>> ContinuedFraction[Pi, 10]
Expand Down
3 changes: 0 additions & 3 deletions mathics/builtin/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ def eval_onevariable(self, f, x, evaluation: Evaluation):
for candidate in candidates:
value = second_derivative.subs(candidate)
if value.is_real and value > 0:
if candidate is not list:
candidate = candidate

minimum_list.append([candidate[sympy_x], sympy_f.subs(candidate)])

return ListExpression(
Expand Down
4 changes: 2 additions & 2 deletions mathics/builtin/specialfns/gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ class Subfactorial(SympyFunction):
>> Subfactorial[6.0]
= 265

Here is how the exponential, 'Factorial', and 'Subfactoral' grow in comparison:
Here is how the exponential, 'Factorial', and 'Subfactorial' grow in comparison:
>> LogPlot[{10^x, Factorial[x], Subfactorial[x]}, {x, 0, 25}, PlotPoints->26]
= -Graphics-

Expand All @@ -589,7 +589,7 @@ class Subfactorial(SympyFunction):
rules = {
"Subfactorial[elements_List]": "Subfactorial @@ elements",
}
summary_text = "compute the subfactorial (derangment) of a number"
summary_text = "compute the subfactorial (derangement) of a number"
sympy_name = "subfactorial"

def eval(self, element, evaluation):
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/specialfns/orthogonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def prepare_sympy(self, elements):

class SphericalHarmonicY(MPMathFunction):
r"""
<url>:Spherical Harmonic https://mathworld.wolfram.com/SphericalHarmonic.html</url> (<url>:mpmath: https://mpmath.org/doc/current/functions/orthogonal.html#mpmath.sperharm</url>, <url>:WMA: https://reference.wolfram.com/language/ref/SphericalHarmonicY.html</url>)
<url>:Spherical Harmonic https://mathworld.wolfram.com/SphericalHarmonic.html</url> (<url>:mpmath: https://mpmath.org/doc/current/functions/orthogonal.html#mpmath.spherharm</url>, <url>:WMA: https://reference.wolfram.com/language/ref/SphericalHarmonicY.html</url>)
<dl>
<dt>'SphericalHarmonicY'[$l$, $m$, $\theta$, $\phi$]
<dd>returns the spherical harmonic function $Y_l^m(\theta, \phi)$.
Expand Down
2 changes: 1 addition & 1 deletion mathics/builtin/string/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ class StringSplit(Builtin):
>> StringSplit["x", "x"]
= {}

Split using a delmiter that has nonzero list of 12's
Split using a delimiter that has nonzero list of 12's
>> StringSplit["12312123", "12"..]
= {3, 3}

Expand Down
2 changes: 1 addition & 1 deletion mathics/core/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ def is_literal(self) -> bool:
`is_uncertain_final_definitions()` we don't need a
`definitions` parameter.
"""
# Right now we are pessimisitic. We might consider changing this for
# Right now we are pessimistic. We might consider changing this for
# Lists. Lists definitions can't be changed right?
return False
# If we have a List we may do something like:
Expand Down
2 changes: 1 addition & 1 deletion mathics/doc/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def __init__(self):

def gather_doctest_data(self):
"""
Populates the documentatation.
Populates the documentation.
(deprecated)
"""
logging.warning(
Expand Down
3 changes: 1 addition & 2 deletions mathics/eval/arithfns/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ def eval_Times(*items: BaseElement) -> Optional[BaseElement]:
exp,
)
continue
else:
item = item

# Otherwise, just append the element...
elements.append(item)

Expand Down
4 changes: 2 additions & 2 deletions mathics/format/asy_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def cubic(p0, p1, p2, p3):
list(chain(p1, p2, p3))
)

def quadratric(qp0, qp1, qp2):
def quadratic(qp0, qp1, qp2):
# asymptote only supports cubic beziers, so we convert this quadratic
# bezier to a cubic bezier, see http://fontforge.github.io/bezier.html

Expand All @@ -75,7 +75,7 @@ def quadratric(qp0, qp1, qp2):
def linear(p0, p1):
return "--(%.5g,%.5g)" % p1

forms = (linear, quadratric, cubic)
forms = (linear, quadratic, cubic)

def path(max_degree, p):
max_degree = min(max_degree, len(forms))
Expand Down
Loading