npstreams.multilinspace

npstreams.multilinspace(start, stop, num, endpoint=True)

Generate multilinear space, for joining the values in two iterables.

Parameters
  • start (iterable of floats) – The starting value. This iterable will be consumed.

  • stop (iterable of floats) – The end value. This iterable will be consumed.

  • num (int) – Number of samples to generate.

  • endpoint (bool, optional) – If True (default), the endpoint is included in the linear space.

Yields

val (tuple) – Tuple of the same length as start and stop

Examples

>>> from npstreams import multilinspace
>>> multispace = multilinspace(start = (0, 0), stop = (1, 1), num = 4, endpoint = False)
>>> print(list(multispace))
[(0, 0), (0.25, 0.25), (0.5, 0.5), (0.75, 0.75)]

See also

linspace

generate a linear space between two numbers