From 67a8131962a0844132f277b41e2057a696f4d24d Mon Sep 17 00:00:00 2001 From: Allan Karlson Date: Wed, 31 Jul 2019 15:15:04 +0200 Subject: [PATCH] coverage issue --- spotpy/algorithms/demcz.py | 24 ------------------------ spotpy/unittests/test_algorithms.py | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/spotpy/algorithms/demcz.py b/spotpy/algorithms/demcz.py index 4baef532..d325613a 100644 --- a/spotpy/algorithms/demcz.py +++ b/spotpy/algorithms/demcz.py @@ -555,30 +555,6 @@ def _dream_proposals(currentVectors, history, dimensions, nChains, DEpairs, gamm return proposalVectors -def _dream2_proposals(currentVectors, history, dimensions, nChains, DEpairs, - - gamma, jitter, eps): - """ - generates and returns proposal vectors given the current states - NOT USED ATM - """ - - sampleRange = history.ncombined_history - currentIndex = np.arange(sampleRange - nChains, sampleRange)[:, np.newaxis] - combined_history = history.combined_history - - # choose some chains without replacement to combine - chains = _random_no_replace(1, sampleRange - 1, nChains) - - # makes sure we have already selected the current chain so it is not replaced - # this ensures that the the two chosen chains cannot be the same as the - # chain for which the jump is - chains += (chains >= currentIndex) - - proposalVectors = combined_history[chains[:, 0], :] - return proposalVectors - - class _GRConvergence: """ Gelman Rubin convergence diagnostic calculator class. It currently only calculates the naive diff --git a/spotpy/unittests/test_algorithms.py b/spotpy/unittests/test_algorithms.py index 2d760ed3..19bfa7f7 100644 --- a/spotpy/unittests/test_algorithms.py +++ b/spotpy/unittests/test_algorithms.py @@ -116,7 +116,7 @@ def test_fast(self): self.assertEqual(len(results), self.rep) #Si values should be returned def test_padds(self): - sampler=spotpy.algorithms.padds(padds_spot_setup(),parallel=self.parallel, dbname='Rosen', dbformat=self.dbformat, sim_timeout=self.timeout) + sampler=spotpy.algorithms.padds(padds_spot_setup(),parallel=self.parallel, dbname='RosenPADDS', dbformat=self.dbformat, sim_timeout=self.timeout) sampler.sample(self.rep) results = sampler.getdata() self.assertEqual(len(results)+5, self.rep) #Si values should be returned