esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
422 stars 57 forks source link

[BUG] Documentation for pygmo.decomposition_weights has issues #70

Closed baluyotraf closed 3 years ago

baluyotraf commented 3 years ago

The description of the arguments for decomposition_weights does not seem to be correct. The raises formatting is also a bit off. I also checked the rst and the docs from the website and the rst seems to agree.

https://esa.github.io/pygmo2/mo_utils.html https://github.com/esa/pygmo2/blob/master/pygmo/docstrings.cpp

bluescarni commented 3 years ago

@baluyotraf thanks for reporting the issue. I can see the problem with the formatting of the raises clause, but can you be more specific about the issue with the documentation of the arguments for decomposition_weights?

Pinging @darioizzo as I am not much familiar with this part of the code.

baluyotraf commented 3 years ago

Sure.

method (:class:`str`): the reference point :math:`\mathbf z^*`. It is not used if *method* is ``"weighted"``

Should refer to grid, random, or low_descrepancy

seed (:class:`int`): the decomposition method: one of ``"weighted"``, ``"tchebycheff"`` or ``"bi"``

Mismatched data type, should refer to a seed.

Returns:
    1D NumPy float array:  the weights

The example returns a 2D numpy array.

bluescarni commented 3 years ago

@baluyotraf ok cheers, thanks for clarifying :)

baluyotraf commented 3 years ago

no problem : )

darioizzo commented 3 years ago

yeps all true .... needs a fix.

baluyotraf commented 3 years ago

I can do a quick PR later

bluescarni commented 3 years ago

@baluyotraf that would be great!