def conditional_error(msg, exc=RuntimeError, category=UserWarning, err=None):
    '\n    Raise an exception or issue a warning, depending on the value of _ignore_errors.\n\n    Parameters\n    ----------\n    msg : str\n        The error/warning message.\n    exc : Exception class\n        This exception class is used to create the exception to be raised.\n    category : warning class\n        This category is the class of warning to be issued.\n    err : bool\n        If None, use ignore_errors(), otherwise use value of err to determine whether to\n        raise an exception (err=True) or issue a warning (err=False).\n    '
    if (((err is None) and ignore_errors()) or (err is False)):
        issue_warning(msg, category=category)
    else:
        raise exc(msg)
Raise an exception or issue a warning, depending on the value of _ignore_errors.

Parameters
----------
msg : str
    The error/warning message.
exc : Exception class
    This exception class is used to create the exception to be raised.
category : warning class
    This category is the class of warning to be issued.
err : bool
    If None, use ignore_errors(), otherwise use value of err to determine whether to
    raise an exception (err=True) or issue a warning (err=False).
def conditional_error(msg, exc=RuntimeError, category=UserWarning, err=None):
    '\n    Raise an exception or issue a warning, depending on the value of _ignore_errors.\n\n    Parameters\n    ----------\n    msg : str\n        The error/warning message.\n    exc : Exception class\n        This exception class is used to create the exception to be raised.\n    category : warning class\n        This category is the class of warning to be issued.\n    err : bool\n        If None, use ignore_errors(), otherwise use value of err to determine whether to\n        raise an exception (err=True) or issue a warning (err=False).\n    '
    if (((err is None) and ignore_errors()) or (err is False)):
        issue_warning(msg, category=category)
    else:
        raise exc(msg)