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

MAINT: speed up 1-norm estimation for non-tiny linear operators #4095

Closed
wants to merge 2 commits into from

Conversation

argriffing
Copy link
Contributor

This also halves the expm_multiply time in $ python runtests.py --bench -s sparse.linalg on my system.

@larsmans
Copy link
Contributor

LGTM.

@argriffing
Copy link
Contributor Author

@ewmoore just to be clear, are you suggesting to change

g = np.sort(g)[::-1]

to

g.sort()
g = g[::-1]

with the idea that it avoids a copy?

@ewmoore
Copy link
Member

ewmoore commented Oct 28, 2014

Yes, exactly. Calling the method performs an in place sort. Calling the
function returns a sorted copy. Reversing the sorted array results in a
view either way so is always cheap.

On Tuesday, October 28, 2014, argriffing notifications@github.com wrote:

@ewmoore https://github.com/ewmoore just to be clear, are you
suggesting to change

g = np.sort(g)[::-1]

to

g.sort()
g = g[::-1]

with the idea that it avoids a copy?


Reply to this email directly or view it on GitHub
#4095 (comment).

@argriffing
Copy link
Contributor Author

@ewmoore thanks, I've improved the sorting following your suggestion

@argriffing
Copy link
Contributor Author

TravisCI errors are weird Cython errors, maybe related to a recent Cython release and its interaction with Python3?

@ev-br
Copy link
Member

ev-br commented Nov 3, 2014

The weather in the cloud seems better now: restarted build is all green.

@argriffing
Copy link
Contributor Author

Closing this, to break it into parts so that it is easier to review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants