def __init__(self, data: np.ndarray, order: Order): super(ConstantVariable, self).__init__(data.shape, order) self.data = data.astype(np.float32) # type: np.ndarray self.attributes.add(Constant(self))
def __init__(self, data: np.array, order: Order): super(ConstantVariable, self).__init__(data.shape, order) self.data = data self.attributes = {Constant(self)}