Reads the TFAM file.

    :param fileName: the name of the ``tfam`` file.

    :type fileName: str

    :returns: a representation the ``tfam`` file (:py:class:`numpy.array`).
348024
def readTFAM(fileName):
    
    # Saving the TFAM file
    tfam = None
    with open(fileName, 'r') as inputFile:
        tfam = [
            tuple(i.rstrip("\r\n").split("\t")) for i in inputFile.readlines()
        ]

    tfam = np.array(tfam)

    return tfam
475098
def read_file(filename, binary_mode=False):
  
  mode = 'rb' if binary_mode else 'r'
  with open(filename, mode) as f:
    return f.read()
223662
def read_file(filename):
    
    dtype = np.dtype([('same_cell', np.int32),
                      ('N1', np.int),
                      ('N2', np.int),
                      ('time', np.float)
                      ])
    if pd is not None:
        timings = pd.read_csv(filename, header=None,
                              engine="c",
                              dtype={'same_cell': np.int32,
                                     'N1': np.int,
                                     'N2': np.int,
                                     'time': np.float},
                              index_col=None,
                              names=['same_cell', 'N1', 'N2', 'time'],
                              delim_whitespace=True)
    else:
        timings = np.loadtxt(filename, dtype=dtype)
    return timings
394373
def read(filename,**kwargs):
    
    base,ext = os.path.splitext(filename)
    if ext in ('.fits','.fz'):
        # Abstract fits here...
        return fitsio.read(filename,**kwargs)
    elif ext in ('.npy'):
        return np.load(filename,**kwargs)
    elif ext in ('.csv'):
        return np.recfromcsv(filename,**kwargs)
    elif ext in ('.txt','.dat'):
        return np.genfromtxt(filename,**kwargs)

    msg = "Unrecognized file type: %s"%filename
    raise ValueError(msg)
527447
def read_file(filename):
   

   infile = open(filename, 'r')
   lines = infile.readlines()
   infile.close()

   return lines
1155967
def read(filename, data_wrapper=DataWrapper):
    ''''''
    data = np.loadtxt(filename)
    if len(np.shape(data)) == 1:
        data = np.reshape(data, (1, -1))
    data = data[:, [X, Y, Z, R, TYPE, ID, P]]
    return data_wrapper(data, 'SWC', None)
19594
def read_from_file(file_name):
    
    from .docxfile import DOCXFile

    dfile = DOCXFile(file_name)
    dfile.parse()

    return dfile
779108
def _maybe_read_file(filename):
  
  try:
    with open(filename) as infile:
      return infile.read()
  except IOError as e:
    if e.errno == errno.ENOENT:
      return None
581614
def read_local_file(filename):
    
    frm = inspect.currentframe().f_back
    if frm.f_code.co_name == 'run_code':
        frm = frm.f_back
    path = os.path.split(frm.f_code.co_filename)[0]
    return read_file(os.path.join(path, filename))
953377
def _read(self, filename):
        """"""
        data = {}
        parsers = [
            FirstDataParser(), CoordinateParser(), EnergyGradParser(),
            SkipApproxHessian(), HessianParser(), MassParser(),
        ]
        with open(filename) as f:
            while True:
                line = f.readline()
                if line == "":
                    break
                # at each line, a parsers checks if it has to process a piece of
                # file. If that happens, the parser gets control over the file
                # and reads as many lines as it needs to collect data for some
                # attributes.
                for parser in parsers:
                    if parser.test(line, data):
                        parser.read(line, f, data)
                        break
        self.__dict__.update(data)
138615
def read_relative_file(filename):
    
    path = join(dirname(abspath(__file__)), filename)
    with io.open(path, encoding='utf-8') as f:
        return f.read()
841771
def parse_file(self, name):
        
        with open(name, "rb") as fp:
            return self.parse(fp.read())
29571
def get_file(self, filename):
        
        try:
            return self.zip.read(filename)
        except KeyError:
            raise FileNotPresent(filename)
1320331
def file(filename):
        
        m = hashlib.md5()
        with open(filename, 'rb') as f:
            m.update(f.read())
            result = m.hexdigest()
            return result
939691
def read(filename):
    
    import os
    here = os.path.dirname(os.path.abspath(__file__))
    with open(os.path.join(here, filename)) as fd:
        return fd.read()
1308488
def read(filename):
    """"""
    path = join(here, filename)
    with open(path, "r") as fin:
        return fin.read().strip()
427226
def read(fname):
    '''
    
    '''
    file_path = os.path.join(SETUP_DIRNAME, fname)
    with codecs.open(file_path, encoding='utf-8') as rfh:
        return rfh.read()