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
andstop()
are now supported.Changed in version 1.20.0: Values are rounded towards
-inf
instead of0
when an integerdtype
is specified. The old behavior can still be obtained withnp.linspace(start, stop, num).astype(int)