changed types to numpy array. this resolve the pickling bug