def _inputs_to_vector(self, inputs):
    var_shape = self.metadata['var_shape']
    num_var = self.metadata['num_var']
    size = np.prod(var_shape)
    x = np.zeros((num_var * size))
    for i in range(num_var):
        x_i = inputs[self._cycle_names['x'].format(i)].flat
        x[(size * i):(size * (i + 1))] = x_i
    return x
def _inputs_to_vector(self, inputs):
    var_shape = self.metadata['var_shape']
    num_var = self.metadata['num_var']
    size = np.prod(var_shape)
    x = np.zeros((num_var * size))
    for i in range(num_var):
        x_i = inputs[self._cycle_names['x'].format(i)].flat
        x[(size * i):(size * (i + 1))] = x_i
    return x