Skip to content

Commit

Permalink
Fix bug to be able to use numpy 1.14+
Browse files Browse the repository at this point in the history
  • Loading branch information
Froskekongen committed Apr 5, 2018
1 parent 06b1662 commit a252df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgmpy/sampling/HMC.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def sample(self, initial_pos, num_samples, trajectory_length, stepsize=None, ret

# Genrating sample
position_m, _ = self._sample(position_m, trajectory_length, stepsize, lsteps)
samples[i] = position_m
position_m_out = np.core.records.fromarrays(position_m, dtype=samples[i].dtype)
samples[i] = position_m_out

self.acceptance_rate = self.accepted_proposals / num_samples

Expand Down

0 comments on commit a252df0

Please sign in to comment.