scikits.timeseries.TimeSeries.ravel¶
- TimeSeries.ravel()¶
Returns a ravelled view of the instance.
If the instance corresponds to one variable (e.g., self.varshape == ()), the result is the ravelled view of the input. Otherwise, the result is actually a TimeSeries where the series attribute is a reshaped view of the input and where the dates attribute is a ravelled view of the input dates attribute.
Examples
>>> start_date = ts.Date('M', '2001-01') >>> dates = ts.date_array(start_date=start_date, length=4) >>> series = ts.time_series([[1, 2], [3, 4]], dates=dates) >>> series timeseries( [[1 2] [3 4]], dates = [[Jan-2001 Feb-2001] ... [Mar-2001 Apr-2001]], freq = M) >>> series.ravel() timeseries([1 2 3 4], dates = [Jan-2001 ... Apr-2001], freq = M) >>> series = ts.time_series([[1, 2], [3, 4]], start_date=start_date) >>> series timeseries( [[1 2] [3 4]], dates = [Jan-2001 Feb-2001], freq = M) >>> series.ravel() timeseries( [[1 2] [3 4]], dates = [Jan-2001 Feb-2001], freq = M)
