def mod_check(x, y):
 if ((as_tensor_variable(x).dtype in complex_dtypes) or (as_tensor_variable(y).dtype in complex_dtypes)):
  raise scal.Mod.complex_error
 else:
  return mod(x, y)

def mod_check ( x , y ) : if ( ( as_tensor_variable ( x ) . dtype in complex_dtypes ) or ( as_tensor_variable ( y ) . dtype in complex_dtypes ) ) : raise scal . Mod . complex_error else : return mod ( x , y )
make sure we do not try to use complex numbers .