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

DOC: Example for signal.cmplx_sort #8481

Merged
merged 4 commits into from Mar 7, 2018
Merged

Conversation

ziejcow
Copy link
Contributor

@ziejcow ziejcow commented Feb 25, 2018

Reference to: #7168

@WarrenWeckesser WarrenWeckesser added scipy.signal Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Feb 25, 2018
@WarrenWeckesser WarrenWeckesser added this to the 1.1.0 milestone Feb 25, 2018
>>> 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])
Copy link
Member

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])

Copy link
Contributor Author

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.

@pv
Copy link
Member

pv commented Feb 26, 2018 via email

@ziejcow
Copy link
Contributor Author

ziejcow commented Mar 1, 2018

After updating numpy I fixed whitespaces to match current version.
AFAIK all checks passed even in previous version of this PR and hopefully they will pass in this as well.

@ilayn ilayn merged commit 665fe7d into scipy:master Mar 7, 2018
@ilayn
Copy link
Member

ilayn commented Mar 7, 2018

Thanks @ziejcow

adbugger pushed a commit to adbugger/scipy that referenced this pull request Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.signal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants