linspace function

(Shortest import: from brian2 import linspace)

brian2.units.unitsafefunctions.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)[source]

Return evenly spaced numbers over a specified interval.

Returns num evenly spaced samples, calculated over the interval [start, stop()].

The endpoint of the interval can optionally be excluded.

Changed in version 1.16.0: Non-scalar start and stop() are now supported.

Changed in version 1.20.0: Values are rounded towards -inf instead of 0 when an integer dtype is specified. The old behavior can still be obtained with np.linspace(start, stop, num).astype(int)