def _make_stc(data, vertices, tmin=None, tstep=None, subject=None):
 if (isinstance(vertices, list) and (len(vertices) == 2)):
  stc = SourceEstimate(data, vertices=vertices, tmin=tmin, tstep=tstep, subject=subject)
 elif (isinstance(vertices, np.ndarray) or (isinstance(vertices, list) and (len(vertices) == 1))):
  stc = VolSourceEstimate(data, vertices=vertices, tmin=tmin, tstep=tstep, subject=subject)
 elif (isinstance(vertices, list) and (len(vertices) > 2)):
  stc = MixedSourceEstimate(data, vertices=vertices, tmin=tmin, tstep=tstep, subject=subject)
 else:
  raise ValueError('vertices has to be either a list with one or more arrays or an array')
 return stc

def _make_stc ( data , vertices , tmin = None , tstep = None , subject = None ) : if ( isinstance ( vertices , list ) and ( len ( vertices ) == 2 ) ) : stc = SourceEstimate ( data , vertices = vertices , tmin = tmin , tstep = tstep , subject = subject ) elif ( isinstance ( vertices , np . ndarray ) or ( isinstance ( vertices , list ) and ( len ( vertices ) == 1 ) ) ) : stc = VolSourceEstimate ( data , vertices = vertices , tmin = tmin , tstep = tstep , subject = subject ) elif ( isinstance ( vertices , list ) and ( len ( vertices ) > 2 ) ) : stc = MixedSourceEstimate ( data , vertices = vertices , tmin = tmin , tstep = tstep , subject = subject ) else : raise ValueError ( 'vertices has to be either a list with one or more arrays or an array' ) return stc
generate a surface .