Skip to content

Commit

Permalink
FIX GMM 1d issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jmschrei committed Oct 9, 2017
1 parent 33865c4 commit 7a352e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ General Mixture Models
mean that out-of-core updates will have a different initialization now, but then
yield exact updates after that.

- Fixed bug where passing in a 1D array would cause an error by recasting all 1D
arrays as 2D arrays.

Bayesian Networks
.................

Expand Down
1 change: 1 addition & 0 deletions pomegranate/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def _check_input(X, keymap):
if X.ndim == 1:
for i in range(X.shape[0]):
X_ndarray[i] = keymap[0][X[i]]
X_ndarray = X_ndarray.reshape(-1, 1)
else:
for i in range(X.shape[0]):
for j in range(X.shape[1]):
Expand Down

0 comments on commit 7a352e2

Please sign in to comment.