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
DOC: Example for signal.cmplx_sort #8481
Conversation
scipy/signal/signaltools.py
Outdated
>>> vals = [1, 4, 1+1.j, 3] | ||
>>> p_sorted, indx = signal.cmplx_sort(vals) | ||
>>> p_sorted | ||
array([1.0+0.j, 1.0+1.j, 3.+0.j, 4.+0.j]) |
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.
Is this the actual output that you get when you display p_sorted
? With numpy 1.14.1, I get
array([1.+0.j, 1.+1.j, 3.+0.j, 4.+0.j])
Note that the real parts of the first two values are displayed as 1.
, not 1.0
.
With numpy 1.13.1, I get
array([ 1.+0.j, 1.+1.j, 3.+0.j, 4.+0.j])
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.
I just checked it and indeed that's not the case.
The output with version 1.8.2 is:
array([ 1.+0.j, 1.+1.j, 3.+0.j, 4.+0.j])
Just as you pointed out. I just pushed desirable changes into this branch.
Note that the documentation should agree with the latest numpy release.
Not that whitespace matters that much, but there's an automatic check
that needs to pass, and it may not be smart enough to ignore the
whitespace here.
|
After updating numpy I fixed whitespaces to match current version. |
Thanks @ziejcow |
Reference to: #7168