def _check_type_picks(picks):
 err_msg = 'picks must be None, a list or an array of integers'
 if (picks is None):
  pass
 elif isinstance(picks, list):
  if (not all((isinstance(i, int) for i in picks))):
   raise ValueError(err_msg)
  picks = np.array(picks)
 elif isinstance(picks, np.ndarray):
  if (not (picks.dtype.kind == 'i')):
   raise ValueError(err_msg)
 else:
  raise ValueError(err_msg)
 return picks

def _check_type_picks ( picks ) : err_msg = 'picks must be None, a list or an array of integers' if ( picks is None ) : pass elif isinstance ( picks , list ) : if ( not all ( ( isinstance ( i , int ) for i in picks ) ) ) : raise ValueError ( err_msg ) picks = np . array ( picks ) elif isinstance ( picks , np . ndarray ) : if ( not ( picks . dtype . kind == 'i' ) ) : raise ValueError ( err_msg ) else : raise ValueError ( err_msg ) return picks
guarantee type integrity of picks .