'return True, if any variable is bounded'

def has_bounds(self):

    bounds = self.bounds
    if (bounds in (None, [None, None])):
        return False
    for i in xrange(bounds[0]):
        if ((bounds[0][i] is not None) and (bounds[0][i] > (- np.inf))):
            return True
    for i in xrange(bounds[1]):
        if ((bounds[1][i] is not None) and (bounds[1][i] < np.inf)):
            return True
    return False
