Commit Graph

16 Commits

Author SHA1 Message Date
Rohan R Bharadwaj
46842e8c5b
Add missing type hints in matrix directory (#6612)
* Update count_islands_in_matrix.py

* Update matrix_class.py

* Update matrix_operation.py

* Update nth_fibonacci_using_matrix_exponentiation.py

* Update searching_in_sorted_matrix.py

* Update count_islands_in_matrix.py

* Update matrix_class.py

* Update matrix_operation.py

* Update rotate_matrix.py

* Update sherman_morrison.py

* Update spiral_print.py

* Update count_islands_in_matrix.py

* formatting

* formatting

* Update matrix_class.py

* [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>
2022-10-04 20:05:56 +02:00
Omkaar
dbee5f072f
Improve code on f-strings and brevity (#6126)
* Update strassen_matrix_multiplication.py

* Update matrix_operation.py

* Update enigma_machine2.py

* Update enigma_machine.py

* Update enigma_machine2.py

* Update rod_cutting.py

* Update external_sort.py

* Update sol1.py

* Update hill_cipher.py

* Update prime_numbers.py

* Update integration_by_simpson_approx.py
2022-05-13 20:51:44 +08:00
Rohan R Bharadwaj
e9882e41ba
[mypy] Fix matrix_operation.py (#5808)
* Update matrix_operation.py

* Update mypy.ini

* Update DIRECTORY.md

* formatting

* Update matrix_operation.py

* doctest for exception

* A bit more...
2021-11-10 16:22:52 +01:00
Christian Clauss
9200a2e543
from __future__ import annotations (#2464)
* from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
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
Christian Clauss
e77600638d
Travis CI: Identify our ten slowest pytests (#2350)
* Travis CI: Identify our ten slowest tests

https://howchoo.com/g/mtblodnjzjc/how-to-measure-unit-test-execution-times-in-pytest helps us to find the individual tests that are slowing down our Travis CI checks.

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-25 15:47:06 +02:00
wuyudi
6822d1afeb
Update matrix_operation.py (#2344)
* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py
2020-08-21 20:41:48 +02:00
Christian Clauss
23cbe4c352
black matrix_operation.py (#2199)
* black matrix_operation.py

* updating DIRECTORY.md

* Update matrix_operation.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: vinayak <itssvinayak@gmail.com>
2020-07-14 13:53:14 +05:30
wuyudi
367f8ceddd
enhance the ability of add (#2178)
* enhance the ability of add

* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-07 00:22:44 +02:00
vinayak
70cf565387
black (#2166)
* black

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* flake8 error fix

* Remove unreachable code

* union

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-04 13:22:21 +05:30
wuyudi
f70a0a2980
Update matrix_operation.py (#2159)
* Update matrix_operation.py

* Update matrix_operation.py

* Update matrix_operation.py

* use yapf to format the code

* recover the error check

* add typing hint

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* add float doctest

* black formated

* Update searching_in_sorted_matrix.py

* recover this file

* f-string, typing hint , doctest

* Update matrix_operation.py

* Update searching_in_sorted_matrix.py

* Update matrix_operation.py

* Update matrix/matrix_operation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: vinayak <itssvinayak@gmail.com>
2020-07-04 00:58:16 +05:30
onlinejudge95
7b7c1a0135
Fixes unused variable errors in LGTM (#1746)
* Fixes unsed variable errors in LGTM

* Fixes integer check

* Fixes failing tests
2020-02-11 13:59:09 +05:30
Christian Clauss
28419cf839 pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py

* fixup! Format Python code with psf/black push
2020-01-03 22:25:36 +08:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Stephen Gemin
4e0717c3cf Add error & test checks for matrix_operations.py (#925)
* Update matrix_operation.py

1. Adding error checks for integer inputs
2. Adding error checks for matrix operations where size requirements do not match up
3. Added matrix subtraction function
4. included error check so only integer is passed into identity function

* Create test_matrix_operation.py

* Update matrix_ops and Add Test Cases

1. Included error checks in matrix operation.  There were some cases where the functions would not work correctly.

2. PEP8 changes to matrix_operations.py

3. added test cases for matrix operations using pytest.

* Update pytest.ini

Add carriage return to end of file
2019-07-20 05:06:29 +02:00
Hector S
05e5172093 .vs/ directory, matrix_multiplication_addition file and binary tree directory (#894)
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory

* Removed .vs/ folder per #893

* Rename matrix_multiplication_addition.py to matrix_operation.py
2019-06-11 19:24:53 +08:00