def check_consistent_length(*arrays):
 lengths = [_num_samples(X) for X in arrays if (X is not None)]
 uniques = np.unique(lengths)
 if (len(uniques) > 1):
  raise ValueError(('Found input variables with inconsistent numbers of samples: %r' % [int(l) for l in lengths]))

def check_consistent_length ( * arrays ) : lengths = [ _num_samples ( X ) for X in arrays if ( X is not None ) ] uniques = np . unique ( lengths ) if ( len ( uniques ) > 1 ) : raise ValueError ( ( 'Found input variables with inconsistent numbers of samples: %r' % [ int ( l ) for l in lengths ] ) )
check that all arrays have consistent first dimensions .