def tabular_model(dim, name=None):
 table = np.zeros(([2] * dim))
 inputs = tuple((u'x{0}'.format(idx) for idx in range(table.ndim)))
 members = {u'lookup_table': table, u'inputs': inputs}
 if (name is None):
  model_id = _Tabular._id
  _Tabular._id += 1
  name = u'Tabular{0}'.format(model_id)
 return type(str(name), (_Tabular,), members)

def tabular_model ( dim , name = None ) : table = np . zeros ( ( [ 2 ] * dim ) ) inputs = tuple ( ( u'x{0}' . format ( idx ) for idx in range ( table . ndim ) ) ) members = { u'lookup_table' : table , u'inputs' : inputs } if ( name is None ) : model_id = _Tabular . _id _Tabular . _id += 1 name = u'Tabular{0}' . format ( model_id ) return type ( str ( name ) , ( _Tabular , ) , members )
make a tabular model where n_inputs is based on the dimension of the lookup_table .