diff --git a/data/gan.py b/data/gan.py index 767a24b..985e706 100644 --- a/data/gan.py +++ b/data/gan.py @@ -604,7 +604,7 @@ class Predict(GNet): # df = pd.DataFrame(np.round(f)).astype(np.int32) # candidates.append (np.round(_matrix).astype(np.int64)) - candidates.append( [np.round(row).astype(int) for row in _matrix]) + candidates.append(np.array([np.round(row).astype(int) for row in _matrix])) # return candidates[0] if len(candidates) == 1 else candidates return candidates diff --git a/data/maker/prepare/__init__.py b/data/maker/prepare/__init__.py index 381dfc0..9fb0fa7 100644 --- a/data/maker/prepare/__init__.py +++ b/data/maker/prepare/__init__.py @@ -111,13 +111,13 @@ class Input : if 'columns' in _args : self._columns = _args['columns'] - else: - # - # We will look into the count and make a judgment call - _df = pd.DataFrame(self.df.apply(lambda col: col.dropna().unique().size )).T - MIN_SPACE_SIZE = 2 - self._columns = cols if cols else _df.apply(lambda col:None if col[0] == row_count or col[0] < MIN_SPACE_SIZE else col.name).dropna().tolist() - self._io = _df.to_dict(orient='records') + # else: + # + # We will look into the count and make a judgment call + _df = pd.DataFrame(self.df.apply(lambda col: col.dropna().unique().size )).T + MIN_SPACE_SIZE = 2 + self._columns = cols if cols else _df.apply(lambda col:None if col[0] == row_count or col[0] < MIN_SPACE_SIZE else col.name).dropna().tolist() + self._io = _df.to_dict(orient='records') def _initdata(self,**_args): """