'Reorder variables for structural specification'

def reorder(self, order):

    if (len(order) != len(self.params[0, :])):
        raise ValueError('Reorder    specification    length    should    match    number    of    endogenous    variables')
    if isinstance(order[0], string_types):
        order_new = []
        for (i, nam) in enumerate(order):
            order_new.append(self.names.index(order[i]))
        order = order_new
    return _reordered(self, order)
