Skip to content

Commit

Permalink
fix some typos (found by codespell)
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored and spj101 committed Apr 22, 2024
1 parent 1171a6f commit 6e4d57a
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 54 deletions.
28 changes: 14 additions & 14 deletions pySecDec/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
derivative = self.derivatives[index]
Expand Down Expand Up @@ -513,7 +513,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derivative by ``x`` --> have ``x`` coded in ``expolist`` and can have ``x`` in coeffs
Expand Down Expand Up @@ -581,7 +581,7 @@ def _sub_or_add(self, other, sub):
'''
if type(other) is Polynomial:
assert self.number_of_variables == other.number_of_variables, 'Number of varibales must be equal for both polynomials in +'
assert self.number_of_variables == other.number_of_variables, 'Number of variables must be equal for both polynomials in +'

sum_expolist = np.vstack([self.expolist, other.expolist])
sum_coeffs = np.hstack([self.coeffs, -other.coeffs if sub else other.coeffs])
Expand All @@ -599,7 +599,7 @@ def _sub_or_add(self, other, sub):
def __mul__(self, other):
'multiplication operator'
if type(other) is Polynomial:
assert self.number_of_variables == other.number_of_variables, 'Number of varibales must be equal for both factors in *'
assert self.number_of_variables == other.number_of_variables, 'Number of variables must be equal for both factors in *'

product_expolist = np.vstack([other.expolist + term for term in self.expolist])
product_coeffs = np.hstack([other.coeffs * term for term in self.coeffs])
Expand Down Expand Up @@ -858,7 +858,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derive an expression of the form "poly**exponent"
Expand Down Expand Up @@ -1025,7 +1025,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derive an expression of the form "log(poly)"
Expand Down Expand Up @@ -1161,7 +1161,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derivative(p1 + p2 + ...) = derivative(p1) + derivative(p2) + ...
Expand Down Expand Up @@ -1283,7 +1283,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
return ProductRule(*self.factors, copy=False).derive(index)
Expand Down Expand Up @@ -1362,7 +1362,7 @@ def __init__(self, *expressions, **kwargs):
# The `factorlist` is a 3 dimensional array. Its first
# index denotes the terms of the sum :math:`i`. The
# second index denotes the factor :math:`j`. The last
# index denotes the varible to take the derivative with
# index denotes the variable to take the derivative with
# respect to. The value of ``factorlist[i,j,k]`` denotes
# how many derivatives :math:`n_{ijk}` are to be taken.
# If not given, a product of the `expressions` without
Expand Down Expand Up @@ -1403,7 +1403,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# product rule: derivative(<coeff> * x**k) = <coeff> * k * x**(k-1) + derivative(<coeff>) * x**k
Expand Down Expand Up @@ -1431,7 +1431,7 @@ def derive(self, index):
lower_derivative_multiindex = tuple(lower_derivative_multiindex)
lower_derivative = expression[lower_derivative_multiindex]
expression[derivative_multiindex] = lower_derivative.derive(index).simplify() # automatically simplify cache
# set the coefficent to zero if the derivative is zero, so that it doesn't get outputted in str()
# set the coefficient to zero if the derivative is zero, so that it doesn't get outputted in str()
if new_coeffs[n] != 0 and isinstance(expression[derivative_multiindex], Polynomial) and not np.any(expression[derivative_multiindex].expolist):
if sympify_expression(expression[derivative_multiindex]).simplify() == 0:
new_coeffs[n] = 0
Expand Down Expand Up @@ -1606,7 +1606,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derive an expression of the form "base**exponent"
Expand Down Expand Up @@ -1697,7 +1697,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
# derivative(log(arg)) = 1/arg * derivative(arg) = arg**-1 * derivative(arg)
Expand Down Expand Up @@ -1765,7 +1765,7 @@ def derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
return Product(self, self.arg.derive(index), copy=False)
Expand Down
14 changes: 7 additions & 7 deletions pySecDec/code_writer/make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def super_derive(self, index):
:param index:
integer;
The index of the paramater to derive by.
The index of the parameter to derive by.
'''
derivative = self.derivatives[index]
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def is_constant(poly):
for item in after_ibp:
subtracted.extend( integrate_pole_part(item, *integration_variable_indices) )

# intialize expansion
# initialize expansion
pole_parts = [s.factors[1].simplify() for s in subtracted]
regular_parts = [Product( *([s.factors[0]] + s.factors[2:]), copy=False ) for s in subtracted]

Expand Down Expand Up @@ -1348,7 +1348,7 @@ def update_derivatives(basename, derivative_tracker, full_expression, derivative
for name in ordered_decomposed_derivative_names
)

# generate list over all occuring orders in the regulators
# generate list over all occurring orders in the regulators
regulator_powers = list( rangecomb(np.zeros_like(required_orders), required_orders + highest_poles_current_sector) )
number_of_orders = len(regulator_powers)

Expand Down Expand Up @@ -1456,13 +1456,13 @@ def make_package(name, integration_variables, regulators, requested_orders,
:param name:
string;
The name of the c++ namepace and the output
The name of the c++ namespace and the output
directory.
:param integration_variables:
iterable of strings or sympy symbols;
The variables that are to be integrated. The
intgration region depends on the chosen
integration region depends on the chosen
`decomposition_method`.
:param regulators:
Expand Down Expand Up @@ -1534,7 +1534,7 @@ def make_package(name, integration_variables, regulators, requested_orders,
:param functions:
iterable of strings or sympy symbols, optional;
Function symbols occuring in `remainder_expression`,
Function symbols occurring in `remainder_expression`,
e.g.``['f']``.
.. note::
Expand Down Expand Up @@ -1818,7 +1818,7 @@ def make_package(name, integration_variables, regulators, requested_orders,
# make a copy of the `integration_variables` for later reference
all_integration_variables = list(integration_variables)

# intialize the c++ declarations of the `functions`
# initialize the c++ declarations of the `functions`
function_declarations = set()

have_dummy_functions = True if functions else False
Expand Down
4 changes: 2 additions & 2 deletions pySecDec/code_writer/sum_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ def sum_package(name, package_generators, regulators, requested_orders,
.. math::
\sum_j c_{ij} \ \int f_j
Generate a c++ package with an optmized algorithm to
Generate a c++ package with an optimized algorithm to
evaluate the integrals numerically. It writes the names
of the integrals in the file `"integral_names.txt"`.
For the format of the file see :class:`~pySecDec.amplitude_interface.Parser`.
:param name:
string;
The name of the c++ namepace and the output
The name of the c++ namespace and the output
directory.
:param package_generators:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CFunctions log, exp, SecDecInternalPow, SecDecInternalDenominator;
AutoDeclare Symbols SecDecInternalLabel;

* The integrand may be longer than FORM can read in one go.
* We use python to split the the expression if neccessary.
* We use python to split the the expression if necessary.
* Define a procedure that defines the "integrand" expression
#procedure defineExpansion
Global expansion = SecDecInternalsDUMMYIntegrand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <secdecutil/pylink.hpp> // The python-C binding is general and therefore contained in the util
#include <secdecutil/pylink_integral.hpp>

// delegate some template instatiations to separate translation units
// delegate some template instantiations to separate translation units
#ifdef SECDEC_WITH_CUDA
#define EXTERN_NONE_QMC_SEPARATE() \
extern template class secdecutil::integrators::Qmc< \
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/decomposition/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def squash_symmetry_redundant_sectors_sort(sectors, sort_function, indices=None)
If two sectors only differ by a permutation of the
polysymbols (to be interpreted as integration
variables over some inteval), then the two sectors
variables over some interval), then the two sectors
integrate to the same value. Thus we can drop one
of them and count the other twice. The multiple
counting of a sector is accounted for by increasing
Expand Down
4 changes: 2 additions & 2 deletions pySecDec/decomposition/geometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def generate_fan(*polynomials):
considered.
:param polynomials:
abritrarily many instances of :class:`.Polynomial` where
arbitrarily many instances of :class:`.Polynomial` where
all of these have an equal number of variables;
The polynomials to calculate the fan for.
'''
Expand Down Expand Up @@ -230,7 +230,7 @@ def make_sector(cone_indices, cone):
for cone_indices in incidence_lists.values():
cone = transformation[:,cone_indices].T

# triangluate where neccessary
# triangulate where necessary
if len(cone_indices) != dim:
# assert len(cone) > dim # --> this check is done by `triangulate`
triangular_cones = triangulate(cone, normaliz, workdir)
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/decomposition/iterative.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def remap_parameters(singular_parameters, Jacobian, *polynomials):
The Jacobian determinant is multiplied to this polynomial.
:param polynomials:
abritrarily many instances of :class:`.algebra.Polynomial`
arbitrarily many instances of :class:`.algebra.Polynomial`
where all of these have an equal number of variables;
The polynomials of Feynman parameters to be remapped. These
are typically :math:`F` and :math:`U`.
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/decomposition/splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def split_recursively(sector, indices, splitting_point):
yield sector.copy()
return

# We call this function recusively and pop the first index/splitting_value in each iteration
# We call this function recursively and pop the first index/splitting_value in each iteration
index = indices[0]
remaining_indices = indices[1:]
splitting_value = splitting_point[0]
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/disteval.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Options:
--epsabs=X stop if this absolute precision is reached (default: 1e-10)
--epsrel=X stop if this relative precision is reached (default: 1e-4)
--timeout=X stop after at most this many seconds (defaul: inf)
--timeout=X stop after at most this many seconds (default: inf)
--points=X begin integration with this lattice size (default: 1e4)
--presamples=X use this many points for presampling (default: 1e4)
--shifts=X use this many lattice shifts per integral (default: 32)
Expand Down
8 changes: 4 additions & 4 deletions pySecDec/integral_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
def _parse_series_coefficient(text):
"""
Parse a textual representation of a single coefficient
in a series. Retrun a float, a complex number, a tuple
in a series. Return a float, a complex number, a tuple
consisting of the mean and the standard deviation if it
is given, or a tuple of three elements (via _parse_series)
if the coefficient is a nested series.
Expand Down Expand Up @@ -450,7 +450,7 @@ class MultiIntegrator(CPPIntegrator):
.. warning::
The `integral_library` passed to the integrators must be the
same for all of them. Furthermore, an integrator can only be
used to integrate the `integral_library` it has beeen
used to integrate the `integral_library` it has been
constructed with.
.. warning::
Expand Down Expand Up @@ -1344,7 +1344,7 @@ def __call__(
integration_thread.daemon = True # daemonize worker to have it killed when the main thread is killed
integration_thread.start()
while integration_thread.is_alive(): # keep joining worker until it is finished
integration_thread.join(5) # call `join` with `timeout` to keep the main thread interruptable
integration_thread.join(5) # call `join` with `timeout` to keep the main thread interruptible
return_value = return_value_queue.get()
if return_value != 0:
raise RuntimeError("Integration failed, see error message above.")
Expand Down Expand Up @@ -1438,7 +1438,7 @@ def _call_implementation(
if compute_integral_return_value != 0:
return

# convert c++ stings to python strings or bytes (depending on whether we use python2 or python3)
# convert c++ strings to python strings or bytes (depending on whether we use python2 or python3)
str_integral_without_prefactor = self.c_lib.string2charptr(cpp_str_integral_without_prefactor)
str_prefactor = self.c_lib.string2charptr(cpp_str_prefactor)
str_integral_with_prefactor = self.c_lib.string2charptr(cpp_str_integral_with_prefactor)
Expand Down
8 changes: 4 additions & 4 deletions pySecDec/make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def make_package(name, integration_variables, regulators, requested_orders,
:param name:
string;
The name of the c++ namepace and the output
The name of the c++ namespace and the output
directory.
:param integration_variables:
iterable of strings or sympy symbols;
The variables that are to be integrated. The
intgration region depends on the chosen
integration region depends on the chosen
`decomposition_method`.
:param regulators:
Expand Down Expand Up @@ -114,7 +114,7 @@ def make_package(name, integration_variables, regulators, requested_orders,
:param functions:
iterable of strings or sympy symbols, optional;
Function symbols occuring in `remainder_expression`,
Function symbols occurring in `remainder_expression`,
e.g.``['f']``.
.. note::
Expand Down Expand Up @@ -318,7 +318,7 @@ def make_package(name, integration_variables, regulators, requested_orders,
:param form_executable:
string or None, optional;
The path to the form exectuable. The argument is passed
The path to the form executable. The argument is passed
to :meth:`.Coefficient.process`. If ``None``, then either
``$FORM``, ``$SECDEC_CONTRIB/bin/form``, or just ``form``
is used, depending on which environment variable is set.
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/make_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def make_regions(name, integration_variables, regulators, requested_orders, smal
:param name:
string;
The name of the c++ namepace and the output
The name of the c++ namespace and the output
directory.
:param integration_variables:
Expand Down
2 changes: 1 addition & 1 deletion pySecDec/matrix_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def iterative_sort(matrix):
# keep sorting the 2D matrix (in place) along both dimensions
# until it no longer changes

# initilize sort keys such that we enter the while loop at least once
# initialize sort keys such that we enter the while loop at least once
sort_key_axis_0 = None
sort_key_axis_1 = None

Expand Down
Loading

0 comments on commit 6e4d57a

Please sign in to comment.