Skip to content

Commit

Permalink
One-line fix for DESnookerMove and WalkMove (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
emprice authored Oct 17, 2023
1 parent 3f9f886 commit 3520bf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/emcee/moves/de_snooker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_proposal(self, s, c, random):
Ns = len(s)
Nc = list(map(len, c))
ndim = s.shape[1]
q = np.empty((Ns, ndim), dtype=np.float64)
q = np.empty_like(s)
metropolis = np.empty(Ns, dtype=np.float64)
for i in range(Ns):
w = np.array([c[j][random.randint(Nc[j])] for j in range(3)])
Expand Down
2 changes: 1 addition & 1 deletion src/emcee/moves/walk.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_proposal(self, s, c, random):
c = np.concatenate(c, axis=0)
Ns, Nc = len(s), len(c)
ndim = s.shape[1]
q = np.empty((Ns, ndim), dtype=np.float64)
q = np.empty_like(s)
s0 = Nc if self.s is None else self.s
for i in range(Ns):
inds = random.choice(Nc, s0, replace=False)
Expand Down

0 comments on commit 3520bf0

Please sign in to comment.