mtalg.random.integers

integers(low: int, high: int = None, size: int | tuple | None = None, dtype=<class 'numpy.int64'>, endpoint: bool = False) ndarray | Number[source]

Draw random integers from low (inclusive) to high (exclusive), or if endpoint=True, low (inclusive) to high (inclusive).

Parameters:
  • low – Lowest (signed) integers to be drawn from the distribution (unless high=None, in which case this parameter is 0 and this value is used for high).

  • high – If provided, one above the largest (signed) integer to be drawn from the distribution (see above for behavior if high=None).

  • size – Output shape.

  • dtype – Dtype of output array.

  • endpoint – If true, sample from the interval [low, high] instead of the default [low, high); defaults to False.

Returns:

numpy.ndarray or scalar.