Skip to content

Commit

Permalink
Added ceil function from math
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaikollara committed Jan 28, 2017
1 parent 314abd0 commit 3819e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data_utils.py
@@ -1,7 +1,7 @@
import numpy as np
import os
import re

from math import ceil

def clean_string(string_list):
ret_list = []
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_data(paths):
def generate_split(data, labels, val_split):
j = np.concatenate((data, labels.reshape([-1, 1])), 1)
np.random.shuffle(j)
split_point = int(ceil(dat.shape[0]*(1-val_split)))
split_point = int(ceil(data.shape[0]*(1-val_split)))
train_data = j[:split_point,:-1]
val_data = j[split_point:,:-1]
train_labels = j[:split_point,-1]
Expand Down

0 comments on commit 3819e5f

Please sign in to comment.