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

typo in and suggestions for SHGO docs #295

Closed
podkop opened this issue May 28, 2019 · 3 comments
Closed

typo in and suggestions for SHGO docs #295

podkop opened this issue May 28, 2019 · 3 comments

Comments

@podkop
Copy link

podkop commented May 28, 2019

Page https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.shgo.html,
the description of "constraints" argument ("constraints : dict or sequence of dict, optional"),
2-nd line:
g(x) <= 0 ...

Correct text: g(x) >= 0 ...

Explanation: the inequality constraints ("type": "ineq") are actually treated in the function as >= constraints. It is also confirmed in an example below on the same page (after the line "To demonstrate solving problems with non-linear constraints consider ...").

As a side note from a simple user: some phrases in the scipy docs are formally incorrect.

For example, in the same description of the "constraints" argument we read: "Function(s) R**n in the form:", while below we see the form of constraints, not just functions.
Besides that, below we see sets of constraints, and corresponding vector-valued functions (R**n -> R**p), but then we read "Each constraint is defined..." (the singular form suggesting a single constraint defined by a scalar function). In the example below, only single constraints are defined.

I would write something like following (assuming one can define a set of constraints at once):

Constraints definitions. A sequence where each element defines a set of constraints in either of the following forms:
g(x) >= 0 defined by a function g : R^n -> R^m
h(x) == 0 defined by a function h : R^n -> R^p
Each system of constraints is defined in a dictionary with fields:
...

@rgommers rgommers changed the title A typo in the docs typo in and suggestions for SHGO docs May 29, 2019
@rgommers
Copy link
Member

There's a couple of suggestions here that @Stefan-Endres may want to incorporate in SHGO, so pinging him.

Thanks for the report @podkop. Note that the correct repo for SciPy documentation issues is https://github.com/scipy/scipy (this one is just for the top-level website), so please use that for future issues.

@Stefan-Endres
Copy link

Thank you very much @podkop for the detailed issue and @rgommers for pinging me. I'm almost ready to release a major performance update as well as a number of bug fixes in the stand alone repository, so I will include this doc fix issue and make a pull request to scipy with the latest version.

@rgommers
Copy link
Member

Thanks @Stefan-Endres!

I'll close this issue then, since you have one on your own repo.

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

No branches or pull requests

3 participants