Commit Graph

24 Commits

Author SHA1 Message Date
Du Yuanchao
4d0a8f2355
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>
2020-09-10 10:31:26 +02:00
Sven
1495382367
Fixed bug with incorrect LU decomposition (#2261)
* Fixed Bug #2257

* =

Co-authored-by: Svn-Sp <svn-sp@email>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-01 22:11:39 +02:00
spamegg
473072bd4f
added type hints and doctests to arithmetic_analysis/newton_method.py (#2259)
* added type hints and doctests to arithmetic_analysis/newton_method.py

Continuing #2128
Also changed some variable names, made them more descriptive.

* Added type hints and doctests to arithmetic_analysis/newton_method.py

added a type alias for Callable[[float], float] and cleaned up the exception handling

* added type hints and doctests to arithmetic_analysis/newton_method.py

improved exception handling

* Update newton_method.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-01 15:17:46 +02:00
spamegg
9cda130c07
added type hints and doctests to arithmetic_analysis/intersection.py (#2242)
continuing #2128
2020-08-01 08:02:31 +02:00
spamegg
bd74f20bf2
added type hints and doctests to arithmetic_analysis/bisection.py (#2241)
* added type hints and doctests to arithmetic_analysis/bisection.py

continuing in line with #2128

* modified arithmetic_analysis/bisection.py

Put back print statement at the end, replaced algorithm's print statement with an exception.

* modified arithmetic_analysis/bisection.py

Removed unnecessary type import "Optional"

* modified arithmetic_analysis/bisection.py

Replaced generic Exception with ValueError.

* modified arithmetic_analysis/bisection.py

fixed doctests
2020-07-27 15:23:55 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
Christian Clauss
1f8a21d727
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8

* Fix some tests

* Fix some E741

* Fix some E741

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-22 08:10:11 +02:00
Christian Clauss
bfcb95b297
Create codespell.yml (#1698)
* fixup! Format Python code with psf/black push

* Create codespell.yml

* fixup! Format Python code with psf/black push
2020-01-18 13:24:33 +01:00
Christian Clauss
34c808b375 actions/checkout@v2 (#1643)
* actions/checkout@v2

https://github.com/actions/checkout/releases

* fixup! Format Python code with psf/black push
2019-12-26 19:50:12 +08:00
Rohit Joshi
f4779bc04a Bug Fixed in newton_raphson_method.py (#1634)
* Bug Fixed

* Fixed newton_raphson_method.py

* Fixed newton_raphson_method.py 2

* Fixed newton_raphson_method.py 3

* Fixed newton_raphson_method.py 4

* Fixed newton_raphson_method.py 5

* Fixed newton_raphson_method.py 6

* Update newton_raphson_method.py

* Update newton_raphson_method.py

* # noqa: F401, F403

* newton_raphson

* newton_raphson

* precision: int=10 ** -10

* return float(x)

* 3.1415926536808043

* Update newton_raphson_method.py

* 2.23606797749979

* Update newton_raphson_method.py

* Rename newton_raphson_method.py to newton_raphson.py
2019-12-15 08:27:07 +01:00
GeorgeChambi
9eb50cc223 Improved readability (#1615)
* improved readability

* further readability improvements

* removed csv file and added f
2019-12-07 06:39:59 +01:00
dimgrichr
f8a30b42ce Addition of Secant Method (#876)
* Add files via upload

* Update secant_method.py

* Remove unused import

* Remove unused import
2019-10-28 19:27:00 +01:00
Isaac Gomes de Oliveira
03e9a75d69 Add gaussian_elimination.py for solving linear systems (#1448) 2019-10-25 05:56:56 +02:00
Anmol Jain
54830644a2 Create newton_forward_interpolation.py (#333)
* Create newton_forward_interpolation.py

This code is for calculating newton forward difference interpolation for fixed difference.

* Add doctests and reformat with black
2019-10-22 10:01:14 +02:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Shubham garg
03aba96c0a added defination (#1244) 2019-10-03 21:31:11 +02:00
Christian Clauss
89acf5d017 print() is a function just like every other function (#1101)
* print() is a function just like every other function
2019-08-06 12:14:23 +02:00
QuantumNovice
c27bd5144f in_static_equilibrium checks if a 2D static system is in equilibrium (#1062)
* Add files via upload

* Add files via upload

* Create .a

* Add files via upload

* Add files via upload

* Rename static_solver.py to in_static_equilibrium.py

* Delete .a

* Update in_static_equilibrium.py

* Add files via upload

* Add files via upload

* Update in_static_equilibrium.py

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* pyTests added

* Add files via upload

* Delete red_black_tree.py

* Add files via upload
2019-07-25 20:38:24 +02:00
QuantumNovice
5b5beb61d6 Update newton_raphson_method.py (#1057) 2019-07-20 17:33:04 +02:00
PatOnTheBack
bd4017928e Added Whitespace and Docstring (#924)
* Added Whitespace and Docstring

I modified the file to make Pylint happier and make the code more readable.

* Beautified Code and Added Docstring

I modified the file to make Pylint happier and make the code more readable.

* Added DOCSTRINGS, Wikipedia link, and whitespace

I added DOCSTRINGS and whitespace to make the code more readable and understandable.

* Improved Formatting

* Wrapped comments
* Fixed spelling error for `movement` variable
* Added DOCSTRINGs

* Improved Formatting

* Corrected whitespace to improve readability.
* Added docstrings.
* Made comments fit inside an 80 column layout.
2019-07-01 16:10:18 +08:00
wuminbin
b7cff04574 better implementation for midpoint (#914) 2019-06-24 18:11:07 +08:00
Rafael García Cuéllar
beafe3656f Re-design psnr.py code and change image names (#592)
* Change some Image File names & re-code the psnr algorithm (conserving both methods). Also Added new example.

* Selected psnr method and reformat some code from arithmetic_analysis
2018-11-05 18:19:08 +01:00
Alex Brown
564179a0ec increment 1 2018-10-19 07:48:28 -05:00