def merge_lookup(A, B):
 lookup_table = np.array(A.lookup_table)
 mask = np.isfinite(lookup_table)
 indices = np.array(lookup_table[mask], dtype=int)
 lookup_table[mask] = B.lookup_table[indices]
 return Lookup(A.variable, lookup_table)

def merge_lookup ( A , B ) : lookup_table = np . array ( A . lookup_table ) mask = np . isfinite ( lookup_table ) indices = np . array ( lookup_table [ mask ] , dtype = int ) lookup_table [ mask ] = B . lookup_table [ indices ] return Lookup ( A . variable , lookup_table )
merge two consecutive lookup transforms into one .