From 528e6db0b8fa09ee21c1e4598fed32d2fba6c3db Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 14 Apr 2022 11:41:30 -0500 Subject: [PATCH] bug fix --- data/maker/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index eb4c02d..49227a6 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -306,7 +306,7 @@ class Shuffle(Generator): This is a method that will yield data with low utility """ def __init__(self,**_args): - super().__init__(self) + super().__init__(**_args) def run(self): @@ -315,7 +315,8 @@ class Shuffle(Generator): np.random.shuffle(_index) _iocolumns = self.info['columns'] _ocolumns = list(set(self._df.columns) - set(_iocolumns) ) - _iodf = pd.DataFrame(self._df[_ocolumns],self._df.loc[_index][_iocolumns],index=np.arange(self._df.shape[0])) + # _iodf = pd.DataFrame(self._df[_ocolumns],self._df.loc[_index][_iocolumns],index=np.arange(_index.size)) + _iodf = pd.DataFrame(self._df[_iocolumns],index = np.arange(_index.size)) self._df = self._df[_ocolumns].join(_iodf) @@ -336,8 +337,8 @@ class factory : :param autopilot will generate output automatically :param batch (default 2k) size of the batch """ - - if _args['apply'] == 'shuffe' : + + if _args['apply'] == 'shuffle' : return Shuffle(**_args) elif _args['apply'] == 'generate' : return Generator(**_args)