numpy.savetxt

Here are the examples of the python api numpy.savetxt taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

170 Examples 7

Example 1

Project: pele
Source File: bench_minimization.py
View license
def bench_pure_cpp(prog, coords):
    print ""
    coords_file = "coords.bench"
    print "calling pure c++ executable {} using subprocess module".format(prog)
    np.savetxt(coords_file, coords.ravel())
    
    t0 = time.time()
    p = subprocess.call([prog, coords_file])
    t1 = time.time()
    
    print "pure c++ LJ minimization                : time {}".format(t1-t0)

Example 2

View license
def mean_dvars_wrapper(func_file, mask_file, dvars_out_file=None):
    func    = load(func_file, mask_file)
    dvars   = calc_dvars(func)
    if dvars_out_file:
        np.savetxt(dvars_out_file, dvars, fmt='%.12f')
    mean_d  = calc_mean_dvars(dvars)
    return mean_d[0]

Example 3

Project: seisflows
Source File: test_optimize.py
View license
    def finalize(cls):
        m_new = loadnpy('m_new')
        m_old = loadnpy('m_old')

        if PAR.VERBOSE > 0:
            print '%14.7e %14.7e'%tuple(m_new)

        if cls.status(m_new, m_old):
            print 'Stopping criteria met.\n'
            np.savetxt('niter', [cls.iter], '%d')
            sys.exit(0)

        elif cls.iter >= PAR.END:
            print 'Maximum number of iterations exceeded.\n'
            sys.exit(-1)

Example 4

Project: qutip
Source File: dump.py
View license
    def update_grad_log(self, grad):
        """add an entry to the grad log"""
        self.grad_log.append(grad)
        if self.write_to_file:
            fname = "{}-fid_err_gradients{}.{}".format(self.fname_base,
                                                        len(self.grad_log),
                                                        self.dump_file_ext)
            fpath = os.path.join(self.dump_dir, fname)
            np.savetxt(fpath, grad, delimiter=self.data_sep)

Example 5

Project: radical.pilot
Source File: lsdm.py
View license
    def save_distance_matrix(self, comm, args, distance_matrix_thread):

        size = comm.Get_size()  # number of threads
        rank = comm.Get_rank()  # number of the current thread
        if rank == 0:
            try:
                os.remove(args.dmfile)
            except OSError:
                pass
            dmfile = open(args.dmfile, 'a')
            for idx in xrange(size):
                if idx == 0:
                    distance_matrix = distance_matrix_thread
                else:
                    distance_matrix = comm.recv(source=idx, tag=idx)
                np.savetxt(dmfile, distance_matrix)
            dmfile.close()
        else:
            comm.send(distance_matrix_thread, dest=0, tag=rank)

Example 6

Project: radical.pilot
Source File: lsdm.py
View license
    def save_distance_matrix(self, comm, args, distance_matrix_thread):

        size = comm.Get_size()  # number of threads
        rank = comm.Get_rank()  # number of the current thread
        if rank == 0:
            try:
                os.remove(args.dmfile)
            except OSError:
                pass
            dmfile = open(args.dmfile, 'a')
            for idx in xrange(size):
                if idx == 0:
                    distance_matrix = distance_matrix_thread
                else:
                    distance_matrix = comm.recv(source=idx, tag=idx)
                np.savetxt(dmfile, distance_matrix)
            dmfile.close()
        else:
            comm.send(distance_matrix_thread, dest=0, tag=rank)

Example 7

Project: gensim
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 8

Project: attention-lvcsr
Source File: kaldi2fuel.py
View license
def read_symbols(args):
    with h5py.File(args.h5file, 'r') as h5file:
        value_map = h5file[args.sourcename].attrs['value_map']

    if args.outfilename == '-':
        out_file = sys.stdout
    else:
        out_file=args.outfilename
    value_map.sort(order=('val',))
    numpy.savetxt(out_file, value_map, fmt="%s %d")

Example 9

Project: Py6S
Source File: ground_reflectance.py
View license
    @classmethod
    def _ArrayToString(cls, array):
        text = StringIO.StringIO()
        np.savetxt(text, array, fmt="%.5f", delimiter=' ')
        s = text.getvalue()
        text.close()
        return s

Example 10

Project: simpeg
Source File: MeshIO.py
View license
    def writeModelUBC(mesh, fileName, model):
        """
            Writes a model associated with a SimPEG TensorMesh
            to a UBC-GIF format model file.

            :param string fileName: File to write to
            :param numpy.ndarray model: The model
        """

        # Reshape model to a matrix
        modelMat = mesh.r(model,'CC','CC','M')
        # Transpose the axes
        modelMatT = modelMat.transpose((2,0,1))
        # Flip z to positive down
        modelMatTR = Utils.mkvc(modelMatT[::-1,:,:])

        np.savetxt(fileName, modelMatTR.ravel())

Example 11

Project: pyNastran
Source File: cart3d.py
View license
    def _write_regions(self, outfile, regions, is_binary):
        if is_binary:
            fmt = self._endian + b('i')
            four = pack(fmt, 4)
            outfile.write(four)

            nregions = len(regions)
            fmt = self._endian + b('%ii' % nregions)
            ints = pack(fmt, *regions)
            outfile.write(ints)

            outfile.write(four)
        else:
            fmt = b'%i'
            np.savetxt(outfile, regions, fmt)

Example 12

Project: pyNastran
Source File: time_accurate_results.py
View license
def write_loads(csv_filename, loads, node_id):
    (Cp, Mach, T, U, V, W, p, rhoU) = loads
    #print("loads.keys() = ", sorted(loads.keys()))
    f = open(csv_filename, 'wb')
    dt = 1.0
    t = arange(len(Cp[node_id])) * dt  # broken...
    f.write('time\t')
    savetxt(f, t, delimiter='', newline=',')
    f.write('\n')
    for node_id, Cpi in sorted(iteritems(Cp)):
        f.write("\nnode_id=%i\n" % node_id)

        f.write('Cp[%s],' % node_id)
        savetxt(f, Cpi, delimiter='', newline=',')

        f.write('\np[%s],' % node_id)
        savetxt(f, p[node_id], delimiter='', newline=',')
        f.write('\n\n')
    f.close()

Example 13

Project: tardis
Source File: spectrum.py
View license
    def to_ascii(self, fname, mode='luminosity_density'):
        if mode == 'luminosity_density':
            np.savetxt(fname, zip(self.wavelength.value, self.luminosity_density_lambda.value))
        elif mode == 'flux':
            np.savetxt(fname, zip(self.wavelength.value, self.flux_lambda.value))
        else:
            raise NotImplementedError('only mode "luminosity_density" and "flux" are implemented')

Example 14

Project: thunder
Source File: test_series_io.py
View license
def test_from_text(tmpdir, eng):
    v = [[0, i] for i in range(10)]
    f = os.path.join(str(tmpdir), 'data.txt')
    savetxt(f, v, fmt='%.02g')
    data = fromtext(f, engine=eng)
    assert allclose(data.shape, (10, 2))
    assert data.dtype == 'float64'
    assert allclose(data.toarray(), v)

Example 15

Project: thunder
Source File: test_series_io.py
View license
def test_from_text_skip(tmpdir):
    k = [[i] for i in range(10)]
    v = [[0, i] for i in range(10)]
    a = [kv[0] + kv[1] for kv in zip(k, v)]
    f = os.path.join(str(tmpdir), 'data.txt')
    savetxt(f, a, fmt='%.02g')
    data = fromtext(f, skip=1)
    assert allclose(data.shape, (10, 2))
    assert data.dtype == 'float64'
    assert allclose(data.toarray(), v)

Example 16

Project: splocs
Source File: inout.py
View license
def save_off(filename, vertices=None, faces=None):
    if vertices is None:
        vertices = []
    if faces is None:
        faces = []
    with open(filename, 'w') as f:
        f.write("OFF\n%d %d 0\n" % (len(vertices), len(faces)))
        if len(vertices) > 1:
            np.savetxt(f, vertices, fmt="%f %f %f")
        if len(faces) > 1:
            for face in faces:
                fmt = " ".join(["%d"] * (len(face) + 1)) + "\n"
                f.write(fmt % ((len(face),) + tuple(map(int, face))))

Example 17

Project: westpa
Source File: openmm_propagator.py
View license
    def gen_istate(self, basis_state, initial_state):
        '''Generate a new initial state from the given basis state.'''
        initial_coords = self.basis_coordinates.copy()
        initial_coords[0,0] = random.randrange(5, 16)

        new_template_args = {'initial_state': initial_state}
        istate_data_ref = self.makepath(self.initial_state_ref_template, new_template_args)
        self.mkdir_p(os.path.dirname(istate_data_ref))

        # Save coordinates of initial state as a text file
        # NOTE: this is ok for this example, but should be optimized for large systems
        np.savetxt(istate_data_ref, initial_coords)

        # Calculate pcoord for generated initial state
        pcoord = self.dist(initial_coords[0,:], initial_coords[1,:])
        initial_state.pcoord = np.array([pcoord], dtype=pcoord_dtype) 
        initial_state.istate_status = initial_state.ISTATE_STATUS_PREPARED

        return initial_state

Example 18

Project: elm
Source File: mltools.py
View license
def write(file_name, data):
    """
        Write data to txt file.

        Arguments:
            file_name (str): path and file name.
            data (numpy.ndarray): data to be written.

    """

    np.savetxt(file_name, data)

Example 19

Project: kaggle_otto
Source File: rgf.py
View license
    def write_into_files(self, prefix, x, y=None):
        if not os.path.exists(self.files_location_data_):
            os.makedirs(self.files_location_data_)
        # Write file with X
        data_location = os.path.join(self.files_location_data_, '%s.data.x' % prefix)
        np.savetxt(data_location, x, delimiter='\t', fmt='%.5f')

        paths = dict(x=data_location, y=[])

        if y is not None:
            for i in range(self.n_classes_):
                labels = map(lambda l: ['+1'] if i == l else ['-1'], y)
                labels_location = os.path.join(self.files_location_data_, '%s.data.y.%d' % (prefix, i))
                np.savetxt(labels_location, labels, delimiter='\t', fmt='%s')
                paths['y'].append(labels_location)

        return paths

Example 20

Project: pypcd
Source File: pypcd.py
View license
def save_txt(pc, fname, header=True):
    """ TODO support multi-count fields
    """
    with open(fname, 'w') as f:
        if header:
            header_lst = []
            for field_name, cnt in zip(pc.fields, pc.count):
                if cnt == 1:
                    header_lst.append(field_name)
                else:
                    for c in xrange(cnt):
                        header_lst.append('%s_%04d' % (field_name, c))
            f.write(' '.join(header_lst)+'\n')
        fmtstr = build_ascii_fmtstr(pc)
        np.savetxt(f, pc.pc_data, fmt=fmtstr)

Example 21

Project: python-plyfile
Source File: plyfile.py
View license
    def _write_txt(self, stream):
        '''
        Save a PLY element to an ASCII-format PLY file.  The element may
        contain list properties.

        '''
        for rec in self.data:
            fields = []
            for prop in self.properties:
                fields.extend(prop._to_fields(rec[prop.name]))

            _np.savetxt(stream, [fields], '%.18g', newline='\r\n')

Example 22

Project: gpustats
Source File: scratch.py
View license
def gen_testdata(n=100, k=4):
    # use static data to compare to R
    data = randn(n, k)
    mean = randn(k)

    np.savetxt('test_data', data)
    np.savetxt('test_mean', mean)

Example 23

View license
    def serialise_to_csv(self, split, hidden_states,
                         batch_start=None, batch_end=None):
        """ Serialise the hidden representations from generate_activations
        into a CSV for t-SNE visualisation."""
        logger.info("Serialising merge state features from %s to csv",
                    split)
        fhf_str = "%s-initial_hidden_features" % self.args.run_string

        if self.args.source_vectors is not None:
            fhf_str = "%s-multilingual_initial_hidden_features" % self.args.run_string
        f = open(fhf_str, 'a')
        for h in hidden_states:
            np.savetxt(f, h, delimiter=',', newline=',')
            f.write("\n")
        f.close()

Example 24

Project: pyksc
Source File: cluster.py
View license
def main(tseries_fpath, base_folder, k):
    k = int(k)
    
    idx_fpath = os.path.join(os.path.join(base_folder, '..'), 'train.dat')
    X = ioutil.load_series(tseries_fpath, idx_fpath)

    cent, assign, shift, dists_cent = ksc.inc_ksc(X, k)
    np.savetxt(os.path.join(base_folder, 'cents.dat'), cent, fmt='%.5f')
    np.savetxt(os.path.join(base_folder, 'assign.dat'), assign, fmt='%d')
    np.savetxt(os.path.join(base_folder, 'shift.dat'), shift, fmt='%d')
    np.savetxt(os.path.join(base_folder, 'dists_cent.dat'), dists_cent, 
               fmt='%.5f')

Example 25

Project: pyksc
Source File: multimodel_class.py
View license
def save_results(out_folder, base_name, y_pred, y_true):
    folder = os.path.join(out_folder, base_name)
    
    try:
        os.mkdir(folder)
    except:
        pass
    
    out_file = os.path.join(folder, 'pred.dat')
    np.savetxt(out_file, y_pred)

    with open(os.path.join(folder, 'summ.dat'), 'w') as summ_file:
        print(classification_report(y_true, y_pred), file=summ_file)

Example 26

Project: pycog
Source File: all.py
View license
def train(model, seed=None):
    if seed is None:
        seed = ''
    else:
        seed = ' -s {}'.format(seed)

    tstart = datetime.datetime.now()
    call("python {} {} train{} -g{}"
         .format(join(examplespath, 'do.py'), join(modelspath, model), seed, gpus))
    tend = datetime.datetime.now()

    # Save training time
    totalmins = int((tend - tstart).total_seconds()/60)
    timefile = join(timespath, model + '_time.txt')
    np.savetxt(timefile, [totalmins], fmt='%d')

Example 27

Project: pycog
Source File: all.py
View license
def train_seeds(model, start_seed=1, ntrain=5):
    for seed in xrange(start_seed, start_seed+ntrain):
        suffix = '_s{}'.format(seed)
        s = ' --seed {} --suffix {}'.format(seed, suffix)

        tstart = datetime.datetime.now()
        call("python {} {} clean{}"
             .format(join(examplespath, 'do.py'), join(modelspath, model), s))
        call("python {} {} train{} -g{}"
             .format(join(examplespath, 'do.py'), join(modelspath, model), s, gpus))
        tend = datetime.datetime.now()

        # Save training time
        totalmins = int((tend - tstart).total_seconds()/60)
        timefile = join(timespath, model + suffix + '_time.txt')
        np.savetxt(timefile, [totalmins], fmt='%d')

Example 28

Project: fusedwind
Source File: loadcaseIO.py
View license
    def execute(self):

        for i, case in enumerate(self.load_cases.cases):

            fid = file(self.file_base + '%03d.dat' % i, 'w')
            fid.write('# %s\n' % case.case_id)
            lc2d = case._toarray()
            np.savetxt(fid, lc2d[:, :])

Example 29

Project: mtpy
Source File: pek1dclasses.py
View license
    def write_inmodel(self, wd=None):
        """
        """
        
        if wd is not None:
            self.working_directory = wd
        
        if not hasattr(self,'inmodel'):
            self.build_inmodel()
        
        np.savetxt(os.path.join(self.working_directory,'inmodel.dat'),
                   self.inmodel,
                   fmt=['%5i','%11.4e','%11.4e','%11.4e','%11.4e'])
        print "written inmodel file to {}".format(self.working_directory)

Example 30

Project: NucleoATAC
Source File: VMat.py
View license
    def plot_1d(self,filename=None):
        """plot the 1d insertion representation of the matrix"""
        fig = plt.figure()
        xlim = len(self.one_d)/2
        plt.plot(range(-xlim,xlim+1),self.one_d)
        plt.vlines(-73,0,max(self.one_d)*1.1,linestyles='dashed')
        plt.vlines(73,0,max(self.one_d)*1.1,linestyles='dashed')
        plt.xlabel("Position relative to dyad")
        plt.ylabel("Insertion Frequency")
        if filename:
            fig.savefig(filename)
            plt.close(fig)
            #Also save text output!
            filename2 = ".".join(filename.split(".")[:-1]+['txt'])
            np.savetxt(filename2,self.one_d,delimiter="\t")
        else:
            fig.show()

Example 31

Project: klustaviewa
Source File: recluster.py
View license
def write_fet(fet, filepath):
    with open(filepath, 'w') as fd:
        #header line: number of features
        fd.write('%i\n' % fet.shape[1])
        #next lines: one feature vector per line
        np.savetxt(fd, fet, fmt="%i")

Example 32

Project: klustaviewa
Source File: recluster.py
View license
def write_fet(fet, filepath):
    with open(filepath, 'w') as fd:
        #header line: number of features
        fd.write('%i\n' % fet.shape[1])
        #next lines: one feature vector per line
        np.savetxt(fd, fet, fmt="%i")

Example 33

Project: kwiklib
Source File: tools.py
View license
def save_text(filepath, data, header=None, fmt='%d', delimiter=' '):
    if isinstance(data, basestring):
        with open(filepath, 'w') as f:
            f.write(data)
    else:
        np.savetxt(filepath, data, fmt=fmt, newline='\n', delimiter=delimiter)
        # Write a header.
        if header is not None:
            with open(filepath, 'r') as f:
                contents = f.read()
            contents_updated = str(header) + '\n' + contents
            with open(filepath, 'w') as f:
                f.write(contents_updated)

Example 34

Project: kwiklib
Source File: tools.py
View license
def save_text(filepath, data, header=None, fmt='%d', delimiter=' '):
    if isinstance(data, basestring):
        with open(filepath, 'w') as f:
            f.write(data)
    else:
        np.savetxt(filepath, data, fmt=fmt, newline='\n', delimiter=delimiter)
        # Write a header.
        if header is not None:
            with open(filepath, 'r') as f:
                contents = f.read()
            contents_updated = str(header) + '\n' + contents
            with open(filepath, 'w') as f:
                f.write(contents_updated)

Example 35

Project: dragonn
Source File: __main__.py
View license
def main_predict(sequences=None,
                 arch_file=None,
                 weights_file=None,
                 output_file=None):
    # encode fasta
    print("loading sequence data...")
    X = encode_fasta_sequences(sequences)
    # load model
    print("loading model...")
    model = SequenceDNN.load(arch_file, weights_file)
    # predict
    print("getting predictions...")
    predictions = model.predict(X)
    # save predictions
    print("saving predictions to output file...")
    np.savetxt(output_file, predictions)
    print("Done!")

Example 36

Project: dragonn
Source File: __main__.py
View license
def main_predict(sequences=None,
                 arch_file=None,
                 weights_file=None,
                 output_file=None):
    # encode fasta
    print("loading sequence data...")
    X = encode_fasta_sequences(sequences)
    # load model
    print("loading model...")
    model = SequenceDNN.load(arch_file, weights_file)
    # predict
    print("getting predictions...")
    predictions = model.predict(X)
    # save predictions
    print("saving predictions to output file...")
    np.savetxt(output_file, predictions)
    print("Done!")

Example 37

Project: InfVocLDA
Source File: hybrid.py
View license
    def export_intermediate_gamma(self, directory='../output/tmp/'):
        if not directory.endswith('/'):
            directory += "/";
        
        if self._counter!=0:
            gamma_path = directory + self._gamma_title + str(self._counter) + ".txt";
            numpy.savetxt(gamma_path, self._document_topic_distribution);
            #scipy.io.mmwrite(gamma_path, self._document_topic_distribution);
            self._document_topic_distribution = None;

Example 38

Project: InfVocLDA
Source File: hybrid.py
View license
    def export_intermediate_gamma(self, directory='../output/tmp/'):
        if not directory.endswith('/'):
            directory += "/";
        
        if self._counter!=0:
            gamma_path = directory + self._gamma_title + str(self._counter) + ".txt";
            numpy.savetxt(gamma_path, self._document_topic_distribution);
            #scipy.io.mmwrite(gamma_path, self._document_topic_distribution);
            self._document_topic_distribution = None;

Example 39

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 40

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 41

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 42

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 43

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 44

Project: topical_word_embeddings
Source File: hdpmodel.py
View license
    def save_topics(self, doc_count=None):
        """legacy method; use `self.save()` instead"""
        if not self.outputdir:
            logger.error("cannot store topics without having specified an output directory")

        if doc_count is None:
            fname = 'final'
        else:
            fname = 'doc-%i' % doc_count
        fname = '%s/%s.topics' % (self.outputdir, fname)
        logger.info("saving topics to %s" % fname)
        betas = self.m_lambda + self.m_eta
        np.savetxt(fname, betas)

Example 45

Project: keras-molecules
Source File: sample_latent.py
View license
def main():
    args = get_arguments()
    model = MoleculeVAE()

    data, data_test, charset = load_dataset(args.data)

    if os.path.isfile(args.model):
        model.load(charset, args.model, latent_rep_size = args.latent_dim)
    else:
        raise ValueError("Model file %s doesn't exist" % args.model)

    if not args.visualize:
        x_latent = model.encoder.predict(data)
        np.savetxt(sys.stdout, x_latent, delimiter = '\t')
    else:
        visualize_latent_rep(args, model, data)

Example 46

Project: keras-molecules
Source File: sample_latent.py
View license
def main():
    args = get_arguments()
    model = MoleculeVAE()

    data, data_test, charset = load_dataset(args.data)

    if os.path.isfile(args.model):
        model.load(charset, args.model, latent_rep_size = args.latent_dim)
    else:
        raise ValueError("Model file %s doesn't exist" % args.model)

    if not args.visualize:
        x_latent = model.encoder.predict(data)
        np.savetxt(sys.stdout, x_latent, delimiter = '\t')
    else:
        visualize_latent_rep(args, model, data)

Example 47

Project: yoink
Source File: cmap_app.py
View license
    def dump_txt(self):
        data = self.get_data()
        print('dumping to %s.*.txt' % self.path)
        for key, val in data:
            np.savetxt('%s.%s.txt' % (self.path, key), val)
        print('dumped')

Example 48

Project: yoink
Source File: cmap_app.py
View license
    def dump_txt(self):
        data = self.get_data()
        print('dumping to %s.*.txt' % self.path)
        for key, val in data:
            np.savetxt('%s.%s.txt' % (self.path, key), val)
        print('dumped')

Example 49

Project: yoink
Source File: line_app.py
View license
    def dump_txt(self):
        data = self.get_data()
        print('dumping to %s.*.txt' % self.path)
        for key, val in data:
            np.savetxt('%s.%s.txt' % (self.path, key), val)
        print('dumped')

Example 50

Project: yoink
Source File: line_app.py
View license
    def dump_txt(self):
        data = self.get_data()
        print('dumping to %s.*.txt' % self.path)
        for key, val in data:
            np.savetxt('%s.%s.txt' % (self.path, key), val)
        print('dumped')