@@ -249,12 +249,12 @@ def merge_with_constants(
249249 Merge a list of items with other items that must be placed at certain indices.
250250
251251 :param constants_at: A map of indices to objects that must be placed at
252- those indices.
252+ those indices.
253253 :param xs: Items that fill in the gaps left by ``constants_at``.
254254 :return: ``xs`` with ``constants_at`` inserted at the appropriate
255- points. If there are not enough elements in ``xs`` to fill in the gaps
256- in ``constants_at``, the elements of ``constants_at`` after the gap
257- are dropped.
255+ points. If there are not enough elements in ``xs`` to fill in the gaps
256+ in ``constants_at``, the elements of ``constants_at`` after the gap
257+ are dropped.
258258 """
259259 outi = 0
260260 xi = 0
@@ -344,7 +344,7 @@ def choice(self, a: list[Mapping[str, T]]) -> T | None:
344344 Choose a value with equal probability.
345345
346346 :param a: The list of values to output. Each element is a mapping with
347- a key ``value`` and the key is the value to return.
347+ a key ``value`` and the key is the value to return.
348348 :return: The chosen value.
349349 """
350350 return self .choice_direct (a ).get ("value" , None )
@@ -371,8 +371,8 @@ def zipf_choice(self, a: list[Mapping[str, T]], n: int | None = None) -> T | Non
371371 1/n times as frequently as the first value is chosen.
372372
373373 :param a: The list of rows to choose between, most frequent first.
374- Each element is a mapping with a key ``value`` and the key is the
375- value to return.
374+ Each element is a mapping with a key ``value`` and the key is the
375+ value to return.
376376 :return: The chosen value.
377377 """
378378 c = self .zipf_choice_direct (a , n )
@@ -383,8 +383,8 @@ def weighted_choice(self, a: list[dict[str, Any]]) -> Any:
383383 Choice weighted by the count in the original dataset.
384384
385385 :param a: a list of dicts, each with a ``value`` key
386- holding the value to be returned and a ``count`` key holding the
387- number of that value found in the original dataset
386+ holding the value to be returned and a ``count`` key holding the
387+ number of that value found in the original dataset
388388 :return: The chosen ``value``.
389389 """
390390 vs = []
@@ -406,9 +406,9 @@ def multivariate_normal_np(self, cov: dict[str, Any]) -> np.typing.NDArray:
406406 Return an array of values chosen from the given covariates.
407407
408408 :param cov: Keys are ``rank``: The number of values to output;
409- ``mN``: The mean of variable ``N`` (where ``N`` is between 0 and
410- one less than ``rank``). ``cN_M`` (where 0 < ``N`` <= ``M`` < ``rank``):
411- the covariance between the ``N``th and the ``M``th variables.
409+ ``mN``: The mean of variable ``N`` (where ``N`` is between 0 and
410+ one less than ``rank``). ``cN_M`` (where 0 < ``N`` <= ``M`` < ``rank``):
411+ the covariance between the ``N``\ t h and the ``M``\ t h variables.
412412 :return: A numpy array of results.
413413 """
414414 rank = int (cov ["rank" ])
@@ -473,10 +473,10 @@ def multivariate_normal(self, cov: dict[str, Any]) -> list[float]:
473473 Produce a list of values pulled from a multivariate distribution.
474474
475475 :param cov: A dict with various keys: ``rank`` is the number of
476- output values, ``m0``, ``m1``, ... are the means of the
477- distributions (``rank`` of them). ``c0_0``, ``c0_1``, ``c1_1``, ...
478- are the covariates, ``cN_M`` is the covariate of the ``N``th and
479- ``M``th varaibles, with 0 <= ``N`` <= ``M`` < ``rank``.
476+ output values, ``m0``, ``m1``, ... are the means of the
477+ distributions (``rank`` of them). ``c0_0``, ``c0_1``, ``c1_1``, ...
478+ are the covariates, ``cN_M`` is the covariate of the ``N``\ t h and
479+ ``M``\ t h varaibles, with 0 <= ``N`` <= ``M`` < ``rank``.
480480 :return: list of ``rank`` floating point values
481481 """
482482 out : list [float ] = self .multivariate_normal_np (cov ).tolist ()
@@ -487,11 +487,11 @@ def multivariate_lognormal(self, cov: dict[str, Any]) -> list[float]:
487487 Produce a list of values pulled from a multivariate distribution.
488488
489489 :param cov: A dict with various keys: ``rank`` is the number of
490- output values, ``m0``, ``m1``, ... are the means of the
491- distributions (``rank`` of them). ``c0_0``, ``c0_1``, ``c1_1``, ...
492- are the covariates, ``cN_M`` is the covariate of the ``N``th and
493- ``M``th varaibles, with 0 <= ``N`` <= ``M`` < ``rank``. These
494- are all the means and covariants of the logs of the data.
490+ output values, ``m0``, ``m1``, ... are the means of the
491+ distributions (``rank`` of them). ``c0_0``, ``c0_1``, ``c1_1``, ...
492+ are the covariates, ``cN_M`` is the covariate of the ``N``\ t h and
493+ ``M``\ t h varaibles, with 0 <= ``N`` <= ``M`` < ``rank``. These
494+ are all the means and covariants of the logs of the data.
495495 :return: list of ``rank`` floating point values
496496 """
497497 out : list [Any ] = np .exp (self .multivariate_normal_np (cov )).tolist ()
@@ -528,13 +528,13 @@ def alternatives(
528528 Pick between other generators.
529529
530530 :param alternative_configs: List of alternative generators.
531- Each alternative has the following keys: "count" -- a weight for
532- how often to use this alternative; "name" -- which generator
533- for this partition, for example "composite"; "params" -- the
534- parameters for this alternative.
531+ Each alternative has the following keys: "count" -- a weight for
532+ how often to use this alternative; "name" -- which generator
533+ for this partition, for example "composite"; "params" -- the
534+ parameters for this alternative.
535535 :param counts: A list of weights for each alternative. If None, the
536- "count" value of each alternative is used. Each count is a dict
537- with a "count" key.
536+ "count" value of each alternative is used. Each count is a dict
537+ with a "count" key.
538538 :return: list of values
539539 """
540540 if counts is not None :
@@ -560,12 +560,12 @@ def with_constants_at(
560560 Insert constants into the results of a different generator.
561561
562562 :param constants_at: A dictionary of positions and objects to insert
563- into the return list at those positions.
563+ into the return list at those positions.
564564 :param subgen: The name of the function to call to get the results
565- that will have the constants inserted into.
565+ that will have the constants inserted into.
566566 :param params: Keyword arguments to the ``subgen`` function.
567567 :return: A list of results from calling ``subgen(**params)``
568- with ``constants_at`` inserted in at the appropriate indices.
568+ with ``constants_at`` inserted in at the appropriate indices.
569569 """
570570 if subgen not in self .PERMITTED_SUBGENS :
571571 logger .error (
0 commit comments