bug fix: volume of data
This commit is contained in:
parent
65a1fadfca
commit
310d599d06
|
@ -593,7 +593,7 @@ class Predict(GNet):
|
||||||
#
|
#
|
||||||
|
|
||||||
# df = pd.DataFrame(np.round(f)).astype(np.int32)
|
# df = pd.DataFrame(np.round(f)).astype(np.int32)
|
||||||
df = pd.DataFrame(np.round(f),dtype=np.int32)
|
df = pd.DataFrame(np.round(f),dtype=int)
|
||||||
|
|
||||||
p = 0 not in df.sum(axis=1).values
|
p = 0 not in df.sum(axis=1).values
|
||||||
x = df.sum(axis=1).values
|
x = df.sum(axis=1).values
|
||||||
|
|
|
@ -163,6 +163,13 @@ class Components :
|
||||||
# reader = args['reader']
|
# reader = args['reader']
|
||||||
# df = reader()
|
# df = reader()
|
||||||
df = args['reader']() if 'reader' in args else args['data']
|
df = args['reader']() if 'reader' in args else args['data']
|
||||||
|
|
||||||
|
if 'slice' in args and 'max_rows' in args['slice']:
|
||||||
|
max_rows = args['slice']['max_rows']
|
||||||
|
if df.shape[0] > max_rows :
|
||||||
|
print (".. slicing ")
|
||||||
|
i = np.random.choice(df.shape[0],max_rows,replace=False)
|
||||||
|
df = df.iloc[i]
|
||||||
|
|
||||||
|
|
||||||
# bounds = Components.split(df,MAX_ROWS,PART_SIZE)
|
# bounds = Components.split(df,MAX_ROWS,PART_SIZE)
|
||||||
|
|
Loading…
Reference in New Issue