Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4d0a8f2

Browse files
realDuYuanChaogithub-actions
and
github-actions
authoredSep 10, 2020
Optimized recursive_bubble_sort (#2410)
* optimized recursive_bubble_sort * Fixed doctest error due whitespace * reduce loop times for optimization * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 25946e4 commit 4d0a8f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+934
-893
lines changed
 

‎arithmetic_analysis/newton_method.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88

99
# function is the f(x) and derivative is the f'(x)
10-
def newton(function: RealFunc, derivative: RealFunc, starting_int: int,) -> float:
10+
def newton(
11+
function: RealFunc,
12+
derivative: RealFunc,
13+
starting_int: int,
14+
) -> float:
1115
"""
1216
>>> newton(lambda x: x ** 3 - 2 * x - 5, lambda x: 3 * x ** 2 - 2, 3)
1317
2.0945514815423474

‎arithmetic_analysis/newton_raphson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def newton_raphson(func: str, a: int, precision: int = 10 ** -10) -> float:
12-
""" Finds root from the point 'a' onwards by Newton-Raphson method
12+
"""Finds root from the point 'a' onwards by Newton-Raphson method
1313
>>> newton_raphson("sin(x)", 2)
1414
3.1415926536808043
1515
>>> newton_raphson("x**2 - 5*x +2", 0.4)

0 commit comments

Comments
 (0)
Please sign in to comment.