-
Notifications
You must be signed in to change notification settings - Fork 55
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
Determinant example documentation fix #192
Conversation
The determinant of the example is supposed to be zero, which is the output of `xt::linalg::det(a)`. And for zero determinant matrices, the sign is 0 and logdet is -inf.
Thanks! How about using a different example that gives nicer results? |
I agree @wolfv we should use something that is well-determined. The current examples may give unneeded confusion... |
See #191 . The current example is terrible, because it involves taking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!!
I left two comments: I would be more on the pedagogical side than on the side of being faithful to the output of the print statement. But that's just style, so I can also live with it as it is.
Improving output clarity, according @tdegeus suggestion Co-authored-by: Tom de Geus <[email protected]>
Improving output clarity, according @tdegeus suggestion Co-authored-by: Tom de Geus <[email protected]>
@tatatupi thanx! The issues on the CI are due to the removal of gcc-7 and gcc-8 from the defualt install. I will fix them in a dedicated PR. |
auto d = xt::linalg::det(a); | ||
std::cout << d << std::endl; // 6.661338e-16 | ||
std::cout << d << std::endl; // 42.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! But what is the question? ;)
The determinant of the example is supposed to be zero, which is the output of
xt::linalg::det(a)
. And for zero determinant matrices, the sign is 0 and logdet is -inf.