Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/n/e/NeuroTools-0.2.0/test/test_spikes.py   NeuroTools(Download)
    def testSaveAndLoadTxt(self):
        self.spk.save("tmp.txt")
        spk2 = spikes.load_spikelist("tmp.txt")
        assert len(spk2) == len(self.spk)
 
    def testSaveAndLoadTxtTimePart(self):
        self.spk.save("tmp.txt")
        spk2 = spikes.load_spikelist("tmp.txt", t_start = 0, t_stop= 50)
    def testSaveAndLoadTxtIdsPart(self):
        self.spk.save("tmp.txt")
        spk2 = spikes.load_spikelist("tmp.txt", id_list=[1,2,3])
        assert numpy.all(spk2.id_list == [1,2,3])
 
    def testSaveAndLoadTxtIdsPartInt(self):
        file = io.StandardTextFile("tmp.txt")
        self.spk.save(file)
        spk2 = spikes.load_spikelist(file, id_list=5)
    def testSaveAndLoadPickle(self):
        file = io.StandardPickleFile("tmp.pickle")
        self.spk.save(file)
        spk2 = spikes.load_spikelist(file)
        assert len(spk2) == len(self.spk)