Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion zeus/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ def sample(self,
if not np.all(np.isfinite(Z)):
raise ValueError('Invalid walker initial positions! \n' +
'Initialise walkers from positions of finite log probability.')
if self.nwalkers > 1 and (X == X[0]).all():
raise ValueError('Invalid walker initial positions! \n' +
'Initialise walkers from different starting positions.')
batch = list(np.arange(self.nwalkers))

# Extend saving space
Expand Down Expand Up @@ -724,4 +727,4 @@ def sample(self,
class sampler(EnsembleSampler):
def __init__(self, *args, **kwargs):
logging.warning('The sampler class has been deprecated. Please use the new EnsembleSampler class.')
super().__init__(*args, **kwargs)
super().__init__(*args, **kwargs)