def _read_lay(fname):
 with open(fname) as f:
  box = None
  (names, pos, ids) = ([], [], [])
  for line in f:
   splits = line.split()
   if (len(splits) == 7):
    (cid, x, y, dx, dy, chkind, nb) = splits
    name = ((chkind + ' ') + nb)
   else:
    (cid, x, y, dx, dy, name) = splits
   pos.append(np.array([x, y, dx, dy], dtype=np.float))
   names.append(name)
   ids.append(int(cid))
 pos = np.array(pos)
 return (box, pos, names, ids)

def _read_lay ( fname ) : with open ( fname ) as f : box = None ( names , pos , ids ) = ( [ ] , [ ] , [ ] ) for line in f : splits = line . split ( ) if ( len ( splits ) == 7 ) : ( cid , x , y , dx , dy , chkind , nb ) = splits name = ( ( chkind + ' ' ) + nb ) else : ( cid , x , y , dx , dy , name ) = splits pos . append ( np . array ( [ x , y , dx , dy ] , dtype = np . float ) ) names . append ( name ) ids . append ( int ( cid ) ) pos = np . array ( pos ) return ( box , pos , names , ids )
aux function .