load data from text file.

        :param filename: name of text file to read
        :type filename: str
        :returns: data read from file using :func:`numpy.loadtxt`
        :rtype: dict
430080
def load_data(self, filename, *args, **kwargs):
        
        # header keys
        header_param = self.parameters.get('header')  # default is None
        # data keys
        data_param = self.parameters['data']  # raises KeyError if no 'data'
        dtype = data_param['dtype']  # raises KeyError if no 'dtype'
        # convert to tuple and normal ASCII
        _utf8_list_to_ascii_tuple(dtype) if dtype else None  # -> tuple of str
        delimiter = data_param.get('delimiter')  # default is None
        skiprows = data_param.get('skiprows')  # default is None
        data_units = data_param.get('units', {})  # default is an empty dict
        data = {}  # a dictionary for data
        # open file for reading
        with open(filename, 'r') as fid:
            # read header
            if header_param:
                data.update(_read_header(fid, header_param))
                fid.seek(0)  # move cursor back to beginning
            # read data
            data_data = np.loadtxt(fid, dtype, delimiter=delimiter,
                                   skiprows=skiprows)
        # apply units
        data.update(_apply_units(data_data, data_units, fid.name))
        return data
1314434
def read(filename, loader=None, implicit_tuple=True, allow_errors=False):
  """"""
  with open(filename, 'r') as f:
    return reads(f.read(),
                 filename=filename,
                 loader=loader,
                 implicit_tuple=implicit_tuple,
                 allow_errors=allow_errors)
994002
def loadFile(self, fileName):
        
        self.fileName = fileName
        self.qteWeb.load(QtCore.QUrl(fileName))
657929
def load_data_and_build(self, filename, delimiter=","):
        
        data = np.genfromtxt(
            filename, dtype=float, delimiter=delimiter, names=True
        )
        data = data.view(np.float64).reshape(data.shape + (-1,))

        X = data[:, 0:-1]
        Y = data[:, -1]

        self.build(X=X, Y=Y)
92415
def load(cls, filename):
        
        cls.load_counter_offset = StoreOptions.id_offset()
        val = pickle.load(filename)
        cls.load_counter_offset = None
        return val
601400
def load_metadata_from_file(filename):
    
    try:
        extension = os.path.splitext(filename)[1]
        return _metadata_loader[extension](filename)
    except KeyError:
        raise TypeError('Cannot read metadata from file %s, extension %s not '
                        'supported at this time' % (filename, extension))
793840
def load_data(filename):
    
    data = pandas.read_csv(filename, header=None, delimiter='\t', skiprows=9)
    return data.as_matrix()
1370413
def read(self, filename, encoding=None):
        
        with open(filename, encoding=encoding) as fp:
            self._read(fp, filename)
        self._filename = os.path.abspath(filename)
769812
def from_file(self, filename):
        
        with gzip.open(filename, 'rb') as f:
            self.parse(f.read())
382514
def load_patt(filename):
    """"""

    with open(filename) as f: 
        lines = f.readlines()

        lst = lines[0].split(',')

        patt = np.zeros([int(lst[0]), int(lst[1])],
                        dtype=np.complex128)

        lines.pop(0)

        for line in lines:
            lst = line.split(',')
            n = int(lst[0])
            m = int(lst[1])
            re = float(lst[2])
            im = float(lst[3])
            patt[n, m] = re + 1j * im

    return sp.ScalarPatternUniform(patt, doublesphere=False)
19594
def read_from_file(file_name):
    
    from .docxfile import DOCXFile

    dfile = DOCXFile(file_name)
    dfile.parse()

    return dfile
1223705
def load(self, filename):
        
        self.filename = filename
        with open(filename) as CFG:
            self.data = yaml.load(CFG.read())

        return self
290676
def _load_from_configs(self, filename):
    
    config_filename = os.path.join(self._config_path, filename)
    if os.path.exists(config_filename):
      try:
        f = open(config_filename, 'r')
        content = ''.join(f.readlines())
        f.close()
        return content
      except Exception as err:
        raise err
    else:
      raise IOError("File not found: {}".format(config_filename))
348431
def from_file(filename):
    
    f = open(filename, 'r')
    j = json.load(f)
    f.close()

    return from_dict(j)
811665
def load_file(self, file_name):
        
        locator = self._make_locator()

        path = locator.find_file(file_name, self.search_dirs)

        return self.read(path)
745100
def read_file(filename):
        
        lines = []
        with open(filename) as f:
            for line in f:
                if len(line.strip()) != 0:
                    lines.append(line.strip())
        return lines
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()