Skip to content

Commit

Permalink
coverage issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bees4ever committed Jul 31, 2019
1 parent ff2f4ce commit 67a8131
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions spotpy/algorithms/demcz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spotpy/unittests/test_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67a8131

Please sign in to comment.