-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
complex numbers should be given equal place in Julia #46476
Conversation
I keep coming across situations where complex numbers are thought of as a low use cases in Julia's docs. This is because they have far fewer examples, far fewer explanations on how stuffs are done with them, and far fewer explanations on how they interact with functions that can be used on them. Julia is a general use programming language but it has a domain where it shines most and that's SCIENTIFIC COMPUTING. This is to say that inasmuch as anything is related to numbers, it should be treated equally in Julia (the Julia docs assumes we only use integers and floating points a lot). If someone comes into Julia building an application or package that rigorously works with complex numbers and he is reading through the docs, he won't get the best experience as there are far fewer explanations on functions working with complex numbers and also far fewer examples of how the functions are used on complex numbers.
Thanks for the contribution and welcome to the Julia community. Great catching the stubs in the function signatures, and nice added examples! While you're at it, maybe you could also add documentation about the keyword arguments, as taken from the real analogues:
Perhaps you could also add that the default imaginary rounding mode equals the real rounding mode. |
Great addition, thanks. But it still confuses me why some tests are failing and the PR are only added with labels but no real look into them to being merged or not? Like is there a way this works in the Julia community that I'm not understanding? |
There are two test failures, one is the whitespace check which means there is trailing whitespace somewhere in the PR. The other is an unrelated spurious failure. |
How is this solved or kinda passed through so the PR can be looked into and then merged (if possible)? |
The whitespace has to be removed, vscode has tools for that, I believe github does too. |
Remove by me?🤦🏿♂️ I don't even know where it is? |
Responsible as we are in the Julia community, those who have merge rights will (usually) check if the failures are related to the changes proposed in a given PR. If they clearly aren't, PRs may get merged even though tests are failing. One reason is that some issues are hard to resolve and require more time. While those issues are worked on and fixed, we as a community don't want to create a long backlog of "harmless" PRs that would otherwise need to wait before the big issue gets addressed. People might simply loose track of which PRs have already been approved. I'm not even sure you can filter PRs according to given approval. OTOH, you don't officially see if somebody else checked the reasons for the CI failure, so somebody might check, confirm failures are unrelated and without much ado just click merge. Sometimes people comment and thereby show visibly that they took care. You as an author can help that process by checking the CI logs. You yourself know very well in which part you made changes and can help others. For instance, if you realize failures are related, leave a comment and demonstrate that you're continuing working on the PR; or ask for help for concrete issues. Any of such effort, just like the initial PR (no matter code or docs) are all much appreciated.
Just keep pushing commits to your branch with ongoing fixes. Don't worry about squashing the commits, that can be done at the end when merging. |
In line 556 of the log it says: base/complex.jl:1082 -- trailing whitespace |
I think its done |
I disagree that the |
That was what I initially thought but then @dkarrasch gave a good and valid suggestion and I thought it good to be added. Well, lets say for now it should be so and probably see what @KristofferC and maybe @ViralBShah thinks of it. |
Okay, I guess it's fair to not repeat the function of the keyword arguments, even though the real method is not quite "more generic" than the complex one. |
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.
After the little grammar fix and the removal of the two paragraphs as discussed, this should be good to go.
Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Julia is a general purpose programming language but it has a domain where it shines most and that's SCIENTIFIC COMPUTING. This is to say that inasmuch as anything is related to numbers, it should be treated equally in Julia. The Julia docs IMO assumes we only use integers and floating points a lot, so they go in length when explaining any stuff on those types and show more examples on them; but for complex numbers, it's just isn't the case (few words and fewer examples is the trend).
If someone comes into Julia building an application or package that rigorously works with complex numbers and he is reading through the docs, he won't get the best experience as there are far fewer explanations on functions working with complex numbers and also far fewer examples of how the functions are even used.
About the Pull Request:
For the
round
function:digits=,
is invalid a keyword argument in a function definition and should bedigits=0
.sigdigits=,
is also invalid as well and should besigdigits,
since no default value is intended to be provided for thesigdigits
keyword anyway and the;
suffice to tell its a keyword argument.This way it will be consistent with the floating point definition of
round
:Also, it's best if a little more, say 2 or 3 more examples are provided on how the
round
function works with complex numbers, most importantly the rounding modes.