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

Add scipy.optimize.Result to API docs #3010

Merged
merged 2 commits into from
Nov 9, 2013
Merged

Add scipy.optimize.Result to API docs #3010

merged 2 commits into from
Nov 9, 2013

Conversation

cdeil
Copy link
Contributor

@cdeil cdeil commented Oct 22, 2013

The return value of scipy.optimize.minimize is a scipy.optimize.Result object as described here:
http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.optimize.minimize.html

But scipy.optimize.Result is currently missing from the scipy API docs.
I guess all that is needed is to list it in the docstring here?
https://github.com/scipy/scipy/blob/master/scipy/optimize/__init__.py
But I wasn't sure where to put it ... a new section at the end?

@pv
Copy link
Member

pv commented Oct 20, 2013

I'd perhaps put it somewhere quite up, maybe immediately after minimize, or to a separate autosummary list after the first one.

The optimize module docstring is IMHO quite confusing overall and would be useful to restructure.

@cdeil
Copy link
Contributor Author

cdeil commented Oct 22, 2013

I tried just listing the Result class in the docstring in optimize/__init__.py (see commit 97d5315).
This doesn't work.

@pv You mentioned that an overall restructure of the optimize docstring might be good ... can you do it?

Apart from that I tried went through the optimize tutorial and put a few (hopefully) improvements into 6c07eaa .
The main change is fixing some examples where keyword argument names have changed.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 97d5315 on cdeil:optimize_docs into ba387ba on scipy:master.

pv added a commit that referenced this pull request Nov 9, 2013
DOC: optimize: add Result to API docs + fix tutorial
@pv pv merged commit fb0451d into scipy:master Nov 9, 2013
@pv
Copy link
Member

pv commented Nov 9, 2013

Thanks, looks good. The restructuring can be done later on.

@cdeil
Copy link
Contributor Author

cdeil commented Nov 9, 2013

@pv Result still doesn't appear in the API docs. I wasn't able to figure out a way to include it (see comment above).
Do you know how to do it or should I open a new issue?

@rgommers
Copy link
Member

rgommers commented Nov 9, 2013

Result should be added to __all__ in optimize/_minimize.py, then it'll appear.

@pv
Copy link
Member

pv commented Nov 9, 2013

Fixed in 8594f29

@cdeil
Copy link
Contributor Author

cdeil commented Nov 9, 2013

Result still doesn't show up at http://docs.scipy.org/doc/scipy-dev/reference/optimize.html .
@pv In 8594f29 you added Result to __all__ in optimize.py, @rgommers said it should be added to __all__ in _minimize.py, maybe that's why?

@pv
Copy link
Member

pv commented Nov 9, 2013

The docs.scipy.org pages are updated only daily, not immediately.

@rgommers
Copy link
Member

rgommers commented Nov 9, 2013

Since Result wasn't public before, it can be renamed I think. The name is way too generic imho. MinimizeResult?

@cdeil
Copy link
Contributor Author

cdeil commented Nov 10, 2013

OK. It's in the docs now. Thanks!

+1 to changing to the more specific name of MinimizeResult.

@pv
Copy link
Member

pv commented Nov 10, 2013

Yes, it's probably too generic, so +1 for rename

@dlax
Copy link
Member

dlax commented Nov 10, 2013

Ralf Gommers a écrit :

Since |Result| wasn't public before, it can be renamed I think. The name
is way too generic imho. |MinimizeResult|?

It's used in root() as well, so something like OptimizeResult may be better.

@argriffing
Copy link
Contributor

If we have namespaces then what about optimize.Result? Not that it really matters to me.

rgommers added a commit to rgommers/scipy that referenced this pull request Dec 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants