@staticmethod
def _to_python_type(variable):
    """
        Returns the value in the variable handling also np.array of one element

        :param variable: input variable
        :return: the value of the variable having a python type (int, float, ...)
        """
    try:
        return variable.item()
    except AttributeError:
        return variable
