def table_from_samples(samples, start=0, stop=(-1), rate=44100):
 if (type(samples) == np.ndarray):
  samples = samples.tolist()
 if (type(samples) != list):
  raise TypeError('samples should be a list or np.array')
 if ((start, stop) != (0, (-1))):
  if (stop > start):
   samples = samples[(start * rate):(stop * rate)]
  elif start:
   samples = samples[(start * rate):]
 table = pyo.DataTable(size=len(samples), init=samples)
 return table

def table_from_samples ( samples , start = 0 , stop = ( - 1 ) , rate = 44100 ) : if ( type ( samples ) == np . ndarray ) : samples = samples . tolist ( ) if ( type ( samples ) != list ) : raise TypeError ( 'samples should be a list or np.array' ) if ( ( start , stop ) != ( 0 , ( - 1 ) ) ) : if ( stop > start ) : samples = samples [ ( start * rate ) : ( stop * rate ) ] elif start : samples = samples [ ( start * rate ) : ] table = pyo . DataTable ( size = len ( samples ) , init = samples ) return table
return a pyo datatable constructed from samples .