def iter_variants(inputs, outputs):
 maps = [('i', 'l')]
 if (not (('i' in inputs) or ('l' in inputs))):
  maps = (maps + [((a + 'dD'), (b + 'fF')) for (a, b) in maps])
 for (src, dst) in maps:
  new_inputs = inputs
  new_outputs = outputs
  for (a, b) in zip(src, dst):
   new_inputs = new_inputs.replace(a, b)
   new_outputs = new_outputs.replace(a, b)
  (yield (new_inputs, new_outputs))

def iter_variants ( inputs , outputs ) : maps = [ ( 'i' , 'l' ) ] if ( not ( ( 'i' in inputs ) or ( 'l' in inputs ) ) ) : maps = ( maps + [ ( ( a + 'dD' ) , ( b + 'fF' ) ) for ( a , b ) in maps ] ) for ( src , dst ) in maps : new_inputs = inputs new_outputs = outputs for ( a , b ) in zip ( src , dst ) : new_inputs = new_inputs . replace ( a , b ) new_outputs = new_outputs . replace ( a , b ) ( yield ( new_inputs , new_outputs ) )
generate variants of ufunc signatures .