diff --git a/pyFTS/data/artificial.py b/pyFTS/data/artificial.py index 0f2916e..58feeef 100644 --- a/pyFTS/data/artificial.py +++ b/pyFTS/data/artificial.py @@ -163,8 +163,14 @@ def _append(additive, start, before, new): else: for k in range(start): new.insert(0,0) - tmp = np.array(before) + np.array(new) - return tmp + + l = len(before) + + if len(before) == 0: + tmp = np.array(new) + else: + tmp = np.array(before) + np.array(new[:l]) + return tmp.tolist() diff --git a/pyFTS/tests/general.py b/pyFTS/tests/general.py index f8154e8..7eb404e 100644 --- a/pyFTS/tests/general.py +++ b/pyFTS/tests/general.py @@ -17,5 +17,8 @@ from pyFTS.common import Transformations, Membership from pyFTS.data import artificial cd = artificial.SignalEmulator() -cd.stationary_gaussian(10,3,length=100) -cd.incremental_gaussian(0.5,0,start=100,length=200) +cd.stationary_gaussian(1,.2,length=10, it=1) +cd.incremental_gaussian(0.5, 0,start=5,length=5) +#cd.stationary_gaussian(3,.2,length=10, it=1, additive=True) +print(len(cd.run())) +