def __init__(self, maxlen, shape, dtype='float32'):
    self.maxlen = maxlen
    self.start = 0
    self.length = 0
    if (dtype == 'uint8'):
        self.data = np.zeros(((maxlen,) + shape), dtype=np.uint8)
        print('Allocating data of size {} ...'.format(self.data.shape))
        self.data += 0
    else:
        self.data = np.zeros(((maxlen,) + shape)).astype(dtype)
    self.teach_idx = 0
def __init__(self, maxlen, shape, dtype='float32'):
    self.maxlen = maxlen
    self.start = 0
    self.length = 0
    if (dtype == 'uint8'):
        self.data = np.zeros(((maxlen,) + shape), dtype=np.uint8)
        print('Allocating data of size {} ...'.format(self.data.shape))
        self.data += 0
    else:
        self.data = np.zeros(((maxlen,) + shape)).astype(dtype)
    self.teach_idx = 0