Commit Graph
485 Commits
Author SHA1 Message Date
Satyam Kumarandkumarsatyam9378-art 25a312ded5 Fix docstring copy-paste error in maths/sumset.py (#15052)
The docstring incorrectly referenced Sylvester's sequence (a copy-paste
error from maths/sylvester_sequence.py) and used param names that did
not match the actual function signature.

Fixes #15013

Co-authored-by: kumarsatyam9378-art <kumarsatyam9378@gmail.com>
2026-08-25 16:09:01 +02:00
pre-commit-ci[bot]cclausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim SmolskiyMaximSmolskiyChristian Clausscopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
840ca00ad3 [pre-commit.ci] pre-commit autoupdate (#14325)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.14...v0.15.4)
- [github.com/tox-dev/pyproject-fmt: v2.12.1 → v2.16.2](https://github.com/tox-dev/pyproject-fmt/compare/v2.12.1...v2.16.2)
- [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.24.1...v0.25)

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

for more information, see https://pre-commit.ci

* updating DIRECTORY.md

* Configure mypy to target Python 3.14 and update to v1.20.0

Agent-Logs-Url: https://github.com/TheAlgorithms/Python/sessions/332481be-4c5f-4412-abf8-6ef4a3913828

Co-authored-by: cclauss <3709715+cclauss@users.noreply.github.com>

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cclauss <3709715+cclauss@users.noreply.github.com>
2026-04-02 02:50:30 +02:00
Tejas RahaneandMaxim Smolskiy 135c748e55 Fix doctests in factorial_recursive function (#13703)
* Fix doctests in factorial_recursive function

The doctests in factorial_recursive were calling factorial() instead of factorial_recursive(). This fix ensures that the tests correctly validate the factorial_recursive function itself.

* Update factorial.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2026-03-11 10:56:30 +03:00
Jaime Fernández González af131b7c3f Remove duplicated return statement in area_reg_polygon (#14362) 2026-03-10 08:44:09 +03:00
Shivang Aryapre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
1ae906a97b Fix incorrect doctest references in fibonacci functions (#14200)
* Fix incorrect doctest references in fibonacci functions

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2026-03-09 07:49:15 +03:00
AnushaAnusha-DeviEpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
f5c3e7c808 Replace assert-based validation with explicit errors in modular_division (#14204)
* Improve documentation for linear search algorithm

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

for more information, see https://pre-commit.ci

* Replace asserts with explicit validation in modular_division

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

for more information, see https://pre-commit.ci

* Update linear_search.py

---------

Co-authored-by: Anusha-DeviE <itzanushadevi@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2026-03-09 07:37:31 +03:00
Yaadhuupre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
84b59c8781 Handle gcd(0, 0) edge case (#14215)
* Use TypeError for non-string input in count_vowels

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

for more information, see https://pre-commit.ci

* Fix docstring and improve input validation in kth_lexicographic_permutation

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

for more information, see https://pre-commit.ci

* Handle gcd(0, 0) edge case

* Update kth_lexicographic_permutation.py

* Update count_vowels.py

* Update greatest_common_divisor.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2026-03-09 07:08:51 +03:00
umutKaracelebipre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
0324e6098d style: add type hints to matrix_exponentiation.py (#14288)
* style: add type hints to matrix_exponentiation.py

* Refactor kth_permutation and fix linter errors

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

for more information, see https://pre-commit.ci

* Delete machine_learning/linear_discriminant_analysis.py

* Revert "Delete machine_learning/linear_discriminant_analysis.py"

This reverts commit de29647311.

* Update linear_discriminant_analysis.py

* Update kth_lexicographic_permutation.py

* Update matrix_exponentiation.py

* Update matrix_exponentiation.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2026-03-09 06:18:15 +03:00
Md MahiuddinandMaxim Smolskiy e2a78d4e76 Add test for non-integer input to factorial function (#13024)
* Add test for non-integer input to factorial function

* Update test_factorial.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-10-20 03:59:36 +03:00
8edc478a19 Adding missing return type to pi_estimator function (#13427)
- Add -> None return type annotation to pi_estimator function
- Improves code clarity and follows Python type hinting best practices
- Function already had proper type hints for parameters

Co-authored-by: Gunish Mukherji <gunishmukherji@Gunishs-MacBook-Air.local>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-10-17 03:36:38 +03:00
OmkaarChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3cea94179d Fix a few typos (#13346)
* Fix typo in spheres intersection print statement

* Fix typo in CONTRIBUTING.md

* Improve comments in comb_sort.py

* pyproject.toml: tool.ruff.target-version = "py314"

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

for more information, see https://pre-commit.ci

* Fix comment formatting in lint.ignore section

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-15 19:35:55 +02:00
iddu e731514bd5 Fix typo and function call in maths module (#13515) 2025-10-15 16:03:33 +02:00
Christian Clauss 9372040da9 Test on Python 3.14 (#12710) 2025-10-07 18:23:37 +02:00
Christian Claussandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 63180d7e24 pre-commit autoupdate 2025-09-11 (#12963)
* pre-commit autoupdate 2025-09-11

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-13 01:56:14 +03:00
Juan DupierrisJuanitoupipoupre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
8f1a6b0ca0 Adding the function is_proth_number (#12399)
* Adding the function isProthNumber(n : int) which returns true if n is a Proth number

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

for more information, see https://pre-commit.ci

* Fixing the issues of the isprothnumber function

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

for more information, see https://pre-commit.ci

* New fixes on isprothnumber()

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

for more information, see https://pre-commit.ci

* Fixes on isprothnumber()

* Fixes on isprothnumber

* Fixes on isprothnumber()

* Fixes on isprothnumber

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

* Update proth_number.py

---------

Co-authored-by: Juanitoupipou <juan.dupierris@imt-atlantique.net>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-09-08 02:41:07 +03:00
__Adityaandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 4394fd93d3 Weierstrass Method (#12877)
* Add weierstrass_method for approximating complex roots

- Implements Durand-Kerner (Weierstrass) method for polynomial root finding
- Accepts user-defined polynomial function and degree
- Uses random perturbation of complex roots of unity for initial guesses
- Handles validation, overflow clipping, and includes doctest

* Update weierstrass_method.py
* add more tests

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

for more information, see https://pre-commit.ci

* Update weierstrass_method.py

* Update weierstrass_method.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-29 17:33:43 +01:00
Mary-0165andMaxim Smolskiy 0c39e43af7 Algorithm to find unique prime factors (#9935)
* algorithm to find unique prime factors

* Update prime_factors.py

* Update prime_factors.py

* Update prime_factors.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-27 23:55:27 +03:00
alejandroaldasalejandroaldaspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
8c1c6c1763 Codex/find and fix a bug (#12782)
* Fix enumeration order in FFT string representation

* updating DIRECTORY.md

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

for more information, see https://pre-commit.ci

* Update radix2_fft.py

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: alejandroaldas <alejandroaldas@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-25 01:16:05 +03:00
Qasim Umarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
7665ba5e25 Add unit tests for factorial.py (#12815)
* Add unit tests for factorial.py

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

for more information, see https://pre-commit.ci

* uvx --python=3.12 unittest2pytest --write test_factorial.py

* Update error message in current_stock_price.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-07-05 12:58:45 +02:00
Christian Claussandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> d0d7f0b18a maths/radix2_fft.py: Fix calculation for Python 3.14 (#12772)
* maths/radix2_fft.py: Fix calculation for Python 3.14

As suggested at:
* https://github.com/TheAlgorithms/Python/issues/12729#issuecomment-2878608477
* https://github.com/TheAlgorithms/Python/pull/12710#discussion_r2080117333

@MaximSmolskiy @KirilBangachev @skirpichev Careful review, please.  I am just implementing the suggestion, but I do not have any expertise in this area.

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

for more information, see https://pre-commit.ci

* Change test results

* GitHub Actions: Rename job from build to directory_writer

It is confusing to have two jobs named `build`.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-29 02:56:25 -04:00
pre-commit-ci[bot]pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
edf7c372a9 [pre-commit.ci] pre-commit autoupdate (#12623)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.10...v0.11.0)
- [github.com/abravalheri/validate-pyproject: v0.23 → v0.24](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.24)

* Fix ruff issues

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-03-18 09:53:49 +01:00
PAUL ADUTWUMandMaxim Smolskiy e3fb5309da Improve decimal_to_fraction.py (#12611)
* Update decimal_to_fraction.py

* Update decimal_to_fraction.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-03-09 00:52:20 +03:00
PAUL ADUTWUMpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
4fbd350b6e Improved test coverage in decimal_to_fraction.py (#12608)
* Imporved test coverage in  decimal_to_fraction.py

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

for more information, see https://pre-commit.ci

* Update decimal_to_fraction.py

* Update decimal_to_fraction.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-03-09 00:47:04 +03:00
pre-commit-ci[bot]pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
4fe50bc1fc [pre-commit.ci] pre-commit autoupdate -- ruff 2025 stable format (#12521)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.1)

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

for more information, see https://pre-commit.ci

* Update maths/dual_number_automatic_differentiation.py

* Update maths/dual_number_automatic_differentiation.py

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

for more information, see https://pre-commit.ci

* Update dual_number_automatic_differentiation.py

* Update dual_number_automatic_differentiation.py

* No <fin-streamer> tag with the specified data-test attribute found.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-01-13 21:52:12 +01:00
Kaustubh Mani Tripathipre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Tianyi Zheng
12b1023a9d [ADDED] Implementation of Geometric Mean. (#10421)
* [ADDED] Implementation of Geometric Mean.

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

for more information, see https://pre-commit.ci

* Rectified type hints

* Typo

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-12-30 18:16:32 -08:00
a4399022e5 chore: improve comments and add tests to trapezoidal rule (#11640)
* chore: improve comments and add tests to trapezoidal rule

* fix: too much characters in line

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* fix: change function name in calls

* modify tests, changes numbers to remove coma

* updating DIRECTORY.md

* Fix doctest whitespace

* Try to fix line length in doctest

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: tianyizheng02 <tianyizheng02@users.noreply.github.com>
2024-12-30 17:11:29 -08:00
Sankabapur da587d06ac Added doctest to /maths/power_using_recursion.py (#11994) 2024-12-30 13:59:03 +03:00
Shikhar Maheshwari 24923ee635 Add doctest to maths/numerical_analysis/intersection.py (#12148) 2024-12-30 13:51:10 +03:00
mahdi tavasolim.tavasolipre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
68b4c6b479 fix is_ip_v4_address_valid.py (#12394)
* fix is_ip_v4_address_valid

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

for more information, see https://pre-commit.ci

* Update is_ip_v4_address_valid.py

---------

Co-authored-by: m.tavasoli <mehdi.sherkattavasoli@basalam.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2024-12-30 13:22:20 +03:00
Maxim Smolskiy bfb0447efb Fix sphinx/build_docs warnings for maths/zellers_congruence (#12481)
* Fix sphinx/build_docs warnings for maths/zellers_congruence

* Fix
2024-12-29 20:29:48 +03:00
jperezrandMRJPEREZR 1909f2272f adding doctests to maths/trapezoidal_rule.py (#12193)
* adding doctests to trapezoidal_rule.py

* adding algorithm delta-star transformation

* updating DIRECTORY.md

* delete file star_delta_transform.py

* updating DIRECTORY.md

* modified:   ../DIRECTORY.md

---------

Co-authored-by: MRJPEREZR <MRJPEREZR@users.noreply.github.com>
2024-12-28 02:03:24 -08:00
Joy Khandelwalpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Tianyi Zheng
b5c8fbf2e8 Add additional doctests, fix grammatical errors for maths/perfect_number.py (#12477)
* Add additional doctests for the perfect number algorithm and fix grammatical errors. Contributes to #9943

* Added newline at End of file

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

for more information, see https://pre-commit.ci

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-12-28 00:51:28 -08:00
Scarfinos 76471819bd Improve test coverage for armstrong numbers (#12327) 2024-12-28 01:52:40 +03:00
Scarfinospre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Maxim Smolskiy
8bbe8caa25 Improve test coverage for matrix exponentiation (#12388)
* #9943 : Adding coverage test for basic_graphs.py

* #9943 : Adding coverage test for basic_graphs.py

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

for more information, see https://pre-commit.ci

* Solve problem of line too long

* Improving coverage for matrix_exponentiation.py

* fix more than one file

* Update matrix_exponentiation.py

* Update matrix_exponentiation.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2024-12-28 01:40:35 +03:00
ScarfinosandMaxim Smolskiy 5bef6ac929 Improve coverage special_numbers (#12414)
* Improve coverage bell_numbers

* improve more function

* Update hamming_numbers.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2024-12-28 01:22:36 +03:00
Maxim Smolskiy 04fbfd6eae Fix sphinx/build_docs warnings for maths/volume (#12464)
* Fix sphinx/build_docs warnings for maths/volume

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix
2024-12-23 19:14:11 -05:00
pre-commit-ci[bot]andpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> fc33c50593 [pre-commit.ci] pre-commit autoupdate (#12398)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-25 21:46:20 +01:00
ARNAV RAJTianyi Zhengpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
9a572dec2b feat: Implemented Matrix Exponentiation Method (#11747)
* feat: add Matrix Exponentiation method
docs: updated the header documentation and added new documentation for
the new function.

* feat: added new function matrix exponetiation method

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

for more information, see https://pre-commit.ci

* feat: This function uses the tail-recursive form of the Euclidean algorithm to calculate

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

for more information, see https://pre-commit.ci

* reduced the number of characters per line in the comments

* removed unwanted code

* feat: Implemented a new function to swaap numbers without dummy variable

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

for more information, see https://pre-commit.ci

* removed previos code

* Done with the required changes

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

for more information, see https://pre-commit.ci

* Done with the required changes

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

for more information, see https://pre-commit.ci

* Done with the required changes

* Done with the required changes

* Done with the required changes

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

for more information, see https://pre-commit.ci

* Update maths/fibonacci.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

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

for more information, see https://pre-commit.ci

* Done with the required changes

* Done with the required changes

* Done with the required changes

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-10-04 09:29:39 -07:00
Christian Clauss 0177ae1cd5 Upgrade to Python 3.13 (#11588) 2024-09-30 23:01:15 +02:00
e3fa014a5a Fix ruff (#11527)
* updating DIRECTORY.md

* Fix ruff

* Fix

* Fix

* Fix

* Revert "Fix"

This reverts commit 5bc3bf3422.

* find_max.py: noqa: PLR1730

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-08-25 17:33:11 +02:00
CarlosZamG ed1900f1b3 Fix typo in integration_by_simpson_approx.py (#11501) 2024-08-06 01:44:58 -07:00
pre-commit-ci[bot]pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
716bdeb68b [pre-commit.ci] pre-commit autoupdate (#11473)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1)

* Fix ruff issues

* Fix ruff issues

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-07-02 07:02:29 +02:00
1cfca52db7 chore: fix typos (#11467)
* chore: fix typos

Signed-off-by: snoppy <michaleli@foxmail.com>

* Apply suggestions from code review

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-06-17 06:27:07 -07:00
Tianyi Zhengandtianyizheng02 723cf9c428 Remove duplicate implementation of median of two arrays algorithm (#11420)
* Remove duplicate implementation of median of two arrays algorithm

Remove maths/median_of_two_arrays.py because the repo has two
implementations of this algorithm, with
data_structures/arrays/median_two_array.py being the other. Even though
maths/median_of_two_arrays.py is the older implementation, the newer
implementation is better documented, has better error handling, and is
already located in a more appropriate directory.

* updating DIRECTORY.md

---------

Co-authored-by: tianyizheng02 <tianyizheng02@users.noreply.github.com>
2024-06-01 05:17:07 -04:00
Maxim SmolskiyandChristian Clauss 4700297b3e Enable ruff RUF002 rule (#11377)
* Enable ruff RUF002 rule

* Fix

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:51:47 +02:00
Maxim Smolskiyandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> a42eb35702 Enable ruff E741 rule (#11370)
* Enable ruff E741 rule

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-19 21:30:22 +02:00
Maxim Smolskiyandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 53b2926704 Enable ruff PGH003 rule (#11345)
* Enable ruff PGH003 rule

* Fix

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

for more information, see https://pre-commit.ci

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 21:29:34 +02:00
Maxim Smolskiy f5bbea3776 Enable ruff RUF005 rule (#11344) 2024-04-02 21:18:47 +02:00
Maxim Smolskiy f437f92279 Enable ruff INP001 rule (#11346)
* Enable ruff INP001 rule

* Fix

* Fix

* Fix

* Fix

* Fix
2024-04-02 21:13:56 +02:00
Maxim Smolskiyandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 516a3028d1 Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule

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

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-28 18:25:41 +01:00