<s> import numpy as np <EOL> def check_indices ( indices ) : <EOL> """<STR_LIT>""" <EOL> if not isinstance ( indices , tuple ) or len ( indices ) != <NUM_LIT:2> : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> if len ( indices [ <NUM_LIT:0> ] ) != len ( indices [ <NUM_LIT:1> ] ) : <EOL> raise ValueError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return indices <EOL> def seed_target_indices ( seeds , targets ) : <EOL> """<STR_LIT>""" <EOL> seeds = np . asarray ( ( seeds , ) ) . ravel ( ) <EOL> targets = np . asarray ( ( targets , ) ) . ravel ( ) <EOL> n_seeds = len ( seeds ) <EOL> n_targets = len ( targets ) <EOL> indices = ( np . concatenate ( [ np . tile ( i , n_targets ) for i in seeds ] ) , <EOL> np . tile ( targets , n_seeds ) ) <EOL> return indices </s>
