[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-11-01 14:38:04 +00:00
parent 3f47a1f5b9
commit 6777f1ebd3

View File

@ -36,7 +36,9 @@ def logarithmic_series(x_value: float, n_terms: int = 5, expand: bool = False) -
n_times_x_minus_1 *= x_value - 1 n_times_x_minus_1 *= x_value - 1
else: else:
sign: str = "-" if (-1) ** (n + 1) == -1 else "" sign: str = "-" if (-1) ** (n + 1) == -1 else ""
term: str = sign + "(" + str(x_value - 1) + "^" + str(n) + ")" + "/" + str(n) term: str = (
sign + "(" + str(x_value - 1) + "^" + str(n) + ")" + "/" + str(n)
)
if term.startswith("-(-"): if term.startswith("-(-"):
term = "(" + term[3::] term = "(" + term[3::]
elif term.startswith("(-"): elif term.startswith("(-"):