def test_stat_quantiles(self): rng = RandomNumberGenerator() rng.setState("0123456789ABCDEF") v = DoubleVector() for i in range(100000): v.append(rng.getDouble()) self.assertAlmostEqual(quantile(v, 0.1), 0.1, 2) self.assertAlmostEqual(quantile_sorted(v, 0.2), 0.2, 2) self.assertAlmostEqual(quantile_sorted(v, 0.3), 0.3, 2) self.assertAlmostEqual(quantile_sorted(v, 0.4), 0.4, 2) self.assertAlmostEqual(quantile_sorted(v, 0.5), 0.5, 2)
def setUp(self): if sys.platform.lower() == "darwin": self.libname = "rml_enkf.dylib" else: self.libname = "rml_enkf.so" self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT)
def setUp(self): self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) if sys.platform.lower() == 'darwin': self.libname = res.res_lib_path + "/std_enkf_debug.dylib" else: self.libname = res.res_lib_path + "/std_enkf_debug.so" self.module = AnalysisModule(lib_name=self.libname)
def setUp(self): self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) if sys.platform.lower() == 'darwin': lib_name = "std_enkf_debug.dylib" else: lib_name = "std_enkf_debug.so" self.libname = find_file(self.SOURCE_ROOT, lib_name) if self.libname: self.module = AnalysisModule(lib_name=self.libname) else: pytest.skip('Debug library not found')
def setUp(self): self.libname = res.res_lib_path + "/rml_enkf.so" self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT)
def setUp(self): self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) self.libname = res.res_lib_path + "/std_enkf_debug.so" self.module = AnalysisModule(lib_name=self.libname)
def setUp(self): self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT) self.module = AnalysisModule(name="STD_ENKF")
def setUp(self): self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT)