def int_or_true_div(x_discrete, y_discrete):
 if (x_discrete and y_discrete):
  if (config.int_division == 'raise'):
   raise IntegerDivisionError("With `config.int_division` set to 'raise', dividing two integer types with '/' is forbidden to avoid confusion between integer and floating point divisions. Please use // for integer division, or if you want a float result either cast one of the arguments to a float or directly call `x.__truediv__(y)`.")
  elif (config.int_division == 'int'):
   warnings.warn('Division of two integer types with x / y is deprecated, please use x // y for an integer division.', DeprecationWarning, stacklevel=4)
   return int_div
  elif (config.int_division == 'floatX'):
   return true_div
  else:
   raise NotImplementedError(config.int_division)
 else:
  return true_div

def int_or_true_div ( x_discrete , y_discrete ) : if ( x_discrete and y_discrete ) : if ( config . int_division == 'raise' ) : raise IntegerDivisionError ( "With `config.int_division` set to 'raise', dividing two integer types with '/' is forbidden to avoid confusion between integer and floating point divisions. Please use // for integer division, or if you want a float result either cast one of the arguments to a float or directly call `x.__truediv__(y)`." ) elif ( config . int_division == 'int' ) : warnings . warn ( 'Division of two integer types with x / y is deprecated, please use x // y for an integer division.' , DeprecationWarning , stacklevel = 4 ) return int_div elif ( config . int_division == 'floatX' ) : return true_div else : raise NotImplementedError ( config . int_division ) else : return true_div
return int or true depending on the type of division used for x / y .