def test_ram_single_false(self): ram = db.ram("UnitTest_tmp", self.parnames, self.like, self.randompar, simulations=self.simulations, chains=1, save_sim=False) ram.save(self.like, self.randompar, self.simulations) ram.finalize() ramdata = ram.getdata() self.assertEqual(str(type(ramdata)), "<class 'numpy.ndarray'>") self.assertEqual(len(ramdata[0]), 7) self.assertEqual(len(ramdata), 2) self.assertEqual(len(ramdata.dtype), len(ram.header)) self.assertEqual(len(ram.header), 7)
def test_ram_single(self): ram = db.ram("UnitTest_tmp", self.parnames, self.like, self.randompar, simulations=self.simulations, chains=1, save_sim=True) ram.save(self.like, self.randompar, self.simulations) ram.finalize() ramdata = ram.getdata() self.assertEqual(str(type(ramdata)), str(type(np.array([])))) self.assertEqual(len(ramdata[0]), 12) self.assertEqual(len(ramdata), 2) self.assertEqual(len(ramdata.dtype), len(ram.header)) self.assertEqual(len(ram.header), 12)