def _prepare_data(self, data):
    if (not isinstance(data, np.ndarray)):
        raise TypeError('DataBuffer data must be numpy array.')
    return data
def _prepare_data(self, data):
    if (not isinstance(data, np.ndarray)):
        raise TypeError('DataBuffer data must be numpy array.')
    return data