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: examples' precision #228

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

ML00 ex00: examples' precision #228

mli42 opened this issue Aug 5, 2022 · 0 comments
Labels

Comments

@mli42
Copy link

mli42 commented Aug 5, 2022

  • Day: 00
  • Exercise: 00

In the examples there is a multiplication between a matrix containing floats and a vector containing ints. The output is written as it was int, but it should be float

Examples

m1 = Matrix([[0.0, 1.0, 2.0],
			 [0.0, 2.0, 4.0]])
v1 = Vector([[1], [2], [3]])
m1 * v1
# Output:
Matrix([[8], [16]]) # << should be float
# Or: Vector([[8], [16] # << should be float

Also, sometimes, the output of a matrix has different precision (0. != 0.0):

Matrix([[0., 2., 4.], [1., 3., 5.]])
Matrix([[0.0, 1.0], [2.0, 3.0], [4.0, 5.0]])

In my opinion, it should be 0.0 everywhere

Fixed on:

  • Github
  • Gitlab
@mli42 mli42 added the fixme label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant