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

ML00 ex00: return type of Matrix * Vector #230

Open
2 tasks
mli42 opened this issue Aug 10, 2022 · 0 comments
Open
2 tasks

ML00 ex00: return type of Matrix * Vector #230

mli42 opened this issue Aug 10, 2022 · 0 comments
Labels
bug Something isn't working fixme

Comments

@mli42
Copy link

mli42 commented Aug 10, 2022

  • Day: 00
  • Exercise: 00

There is a commentary for the __mul__ method that says returns a Vector if we perform Matrix * Vector multiplication

IMG_20220810_120113

But in the examples, there is the choice between Matrix and Vector:

m1 * v1
# Output:
Matrix([[8], [16]])
# Or: Vector([[8], [16]

(Also the last line has ]) missing)

But there is an exception, if we multiply a Matrix of shape (3, 1) with a Vector of shape (1, 2), we should obtain a Matrix of shape (3, 2) and not a Vector. We might want a row vector or a colomn vector when possible, but definitly not every time.

Fixed on:

  • Github
  • Gitlab
@mli42 mli42 added the fixme label Aug 10, 2022
@ezalos ezalos added the bug Something isn't working label Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixme
Projects
None yet
Development

No branches or pull requests

2 participants