Skip to content

Commit

Permalink
Fix serialization of MultiEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan51 committed Dec 15, 2015
1 parent 92795d4 commit 76a7074
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nupic/encoders/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# Map class to Cap'n Proto schema union attribute
_CLASS_ATTR_MAP = {
ScalarEncoder: "scalarEncoder",
AdaptiveScalarEncoder: "adaptivescalar",
AdaptiveScalarEncoder: "adaptiveScalarEncoder",
DateEncoder: "dateEncoder",
LogEncoder: "logEncoder",
CategoryEncoder: "categoryEncoder",
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/nupic/encoders/multi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import unittest2 as unittest

from nupic.encoders.multi import MultiEncoder
from nupic.encoders import ScalarEncoder, SDRCategoryEncoder
from nupic.encoders import ScalarEncoder, AdaptiveScalarEncoder, SDRCategoryEncoder
from nupic.data.dictutils import DictObj

try:
Expand Down Expand Up @@ -101,8 +101,8 @@ def testReadWrite(self):
periodic=True, name="day of week",
forced=True))
original.addEncoder("myval",
ScalarEncoder(w=5, resolution=1, minval=1, maxval=10,
periodic=False, name="aux", forced=True))
AdaptiveScalarEncoder(n=50, w=5, resolution=1, minval=1, maxval=10,
periodic=False, name="aux", forced=True))
originalValue = DictObj(dow=3, myval=10)
output = original.encode(originalValue)

Expand Down

0 comments on commit 76a7074

Please sign in to comment.