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

Expose FACTOR parameter instead of using magic number in scipy.optimize.nnls #12017

Closed
joshjohnston opened this issue May 4, 2020 · 4 comments
Labels
enhancement A new feature or improvement Fortran Items related to the internal Fortran code base scipy.optimize
Milestone

Comments

@joshjohnston
Copy link

The Fortran code in scipy/optimize/nnls/nnls.f uses a parameter FACTOR, which is hardcoded to 0.01, to determine when to end the loop due to lack of linear independence. It would be much appreciated if this magic number was exposed as an option in both the Fortran and the scipy.optimize.nnls python wrapper.

@miladsade96 miladsade96 added enhancement A new feature or improvement Fortran Items related to the internal Fortran code base scipy.optimize labels May 4, 2020
@rgommers
Copy link
Member

rgommers commented May 4, 2020

Hi @joshjohnston, do you have a code example perhaps where this would help?

@Kai-Striega
Copy link
Member

@rgommers I'm not too familiar with the function - so I can't comment on whether it's a good idea or not - but the actual change should be pretty straight forward if you want someone to do it.

@osullivryan
Copy link

Hello @joshjohnston , I took a crack at it. Let me know how that looks!

@dschmitz89
Copy link
Contributor

nnls was recently completely rewritten and the old Fortran source is gone (see #18570). The new code uses another algorithm that does not use this conversion criterion anymore, so closing this.

@ilayn ilayn added this to the 1.12.0 milestone Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement Fortran Items related to the internal Fortran code base scipy.optimize
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants