spacepy.toolbox.linspace¶
-
spacepy.toolbox.
linspace
(min, max, num, **kwargs)[source]¶ Returns linear-spaced bins. Same as numpy.linspace except works with datetime and is faster
- Parameters
- minfloat, datetime
minimum value
- maxfloat, datetime
maximum value
- numinteger
number of linear spaced bins
- Returns
- outarray
linear-spaced bins from min to max in a numpy array
- Other Parameters
- kwargsdict
additional keywords passed into matplotlib.dates.num2date
Notes
This function works on both numbers and datetime objects
Examples
>>> import spacepy.toolbox as tb >>> tb.linspace(1, 10, 4) array([ 1., 4., 7., 10.])