def __init__(self, data, **kwargs): super(NumpyData, self).__init__(kwargs) self.p.type = type(self).__name__ self.r = apollo.make_numpy_data_param(np.array(data, dtype=np.float32))
def __init__(self, name, data, **kwargs): super(NumpyData, self).__init__(self, name, kwargs) from apollo import make_numpy_data_param import numpy as np self.p.rp.ParseFromString(make_numpy_data_param(np.array(data, dtype=np.float32)).SerializeToString())