def _SciPyIssue(x, *extras): # PYCHOK no cover t = map(str, extras) if extras else [] t = _SPACE_.join(str(x).strip().split() + t) if isinstance(x, (RuntimeWarning, UserWarning)): X = SciPyWarning else: X = SciPyError # PYCHOK not really return _error_chain(X(t), other=x)
def _en(en, lo, hi, ename): # U, Error try: if lo <= float(en) <= hi: return except (TypeError, ValueError): pass t = _SPACE_.join( (_outside_, U, _range_, '[%.0F' % (lo, ), '%.0F]' % (hi, ))) raise Error(ename, en, txt=t)
def _incompatible(this): '''(INTERNAL) Format an incompatible text. ''' return _SPACE_.join(('incompatible', 'with', str(this)))