Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the code in Matrix Multiplication in the file docs/datastructure.rst #128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RaviTejaKomma
Copy link

The matrix multiplication example in here gives wrong output:
So changed the code from

c.append([a[i][j] * b[j][i] for j in range(0, n)])

to

c.append([ sum([a[i][k] * b[k][j] for k in range(0, n)]) for j in range(0,n) ])

and also the output of the code snippet

@RaviTejaKomma RaviTejaKomma mentioned this pull request Jul 20, 2018
@kushaldas
Copy link
Owner

Please squash the commit.

…e number: 442

changed the output of matrix multiplication example in docs/datastructure.rst
@RaviTejaKomma RaviTejaKomma force-pushed the update-code-datastructures branch from b72b57a to 8a02f3d Compare July 25, 2018 13:27
@RaviTejaKomma
Copy link
Author

Hello Kushaldas. I have squashed the commits to a single commit. Thanks :)

Base automatically changed from master to main February 17, 2021 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants