From 587248c63b84b010b6c481ac8e64692e950dfaf3 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 21 Apr 2022 11:07:56 -0500 Subject: [PATCH] bug fix --- data/maker/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 630aa41..35a8967 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -219,7 +219,7 @@ class Generator (Learner): index = [ _x not in ['',None,np.nan] for _x in values] - if len(index) == len(values): + if np.sum(index) == 0: # # Sometimes messy data has unpleasant surprises continue @@ -228,6 +228,7 @@ class Generator (Learner): values[index] = list(values[index] + _values )if np.random.randint(0,2) else list(values[index] - _values) values[index] = values[index].astype(_type) x += values.tolist() + print (batches) if x : _log['input']['identical_percentage'] = 100 * (1 - np.divide( (_df[name].dropna() == x).sum(),_df[name].dropna().size)) _df[name] = x #np.array(x,dtype=np.int64) if 'int' in _type else np.arry(x,dtype=np.float64)