Skip to content

Commit

Permalink
Fix several docstrings (#451)
Browse files Browse the repository at this point in the history
## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [N/A] I have added a one-line description of my change to the
changelog in
      `HISTORY.md`
- [x] This PR is ready to go
  • Loading branch information
btjanaka committed Jan 26, 2024
1 parent 6cb1e2e commit 05cd524
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ribs/emitters/_gradient_operator_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GradientOperatorEmitter(EmitterBase):
sigma_g (float): Step size used for gradient arborescence in ask(),
branching from the parents generated by ask_dqd(). If measure
gradients are used, this acts as the standard deviation of the
Gaussian from which to sample the step size.Other wise, this acts as
Gaussian from which to sample the step size. Otherwise, this acts as
the step size itself.
initial_solutions (array-like): An (n, solution_dim) array of solutions
to be used when the archive is empty. If this argument is None, then
Expand Down
10 changes: 5 additions & 5 deletions ribs/emitters/operators/_iso_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class IsoLineOperator(OperatorBase):
Args:
iso_sigma (float): Scale factor for the isotropic distribution used to
generate solutions.
generate solutions.
line_sigma (float): Scale factor for the line distribution used when
generating solutions.
sigma (float or array-like): Standard deviation of the Gaussian
Expand Down Expand Up @@ -48,10 +48,10 @@ def ask(self, parents):
""" Adds Isotropic Guassian noise and directional noise to parents.
Args:
parents (array-like): (2, batch_size, solution_dim)
parents[0] array of solutions selected by emitter
parents[1] array of second batch of solutions passed by
emitter. Used for calculating directional correlation.
parents (array-like): (2, batch_size, solution_dim) parents[0] array
of solutions selected by emitter parents[1] array of second
batch of solutions passed by emitter. Used for calculating
directional correlation.
Returns:
numpy.ndarray: ``(batch_size, solution_dim)`` array that contains
Expand Down
5 changes: 2 additions & 3 deletions ribs/emitters/operators/_operator_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ def ask(self, parents):
"""Operates on parents to generate new solutions.
Args:
parents (array-like): (batch_size, solution_dim) array of
solutions to be mutated. Typically passed in by an emitter
after selection from an archive.
parents (array-like): Array of solutions to be mutated. Typically
passed in by an emitter after selection from an archive.
Returns:
numpy.ndarray: ``(batch_size, solution_dim)`` array that contains
Expand Down

0 comments on commit 05cd524

Please sign in to comment.