Skip to content

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

Open
RaviTejaKomma wants to merge 1 commit intokushaldas:mainfrom
RaviTejaKomma:update-code-datastructures
Open

Fixed the code in Matrix Multiplication in the file docs/datastructure.rst#128
RaviTejaKomma wants to merge 1 commit intokushaldas:mainfrom
RaviTejaKomma:update-code-datastructures

Conversation

@RaviTejaKomma
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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