Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2831 from chetan51/issue-2830
Browse files Browse the repository at this point in the history
Fix serialization of MultiEncoder
  • Loading branch information
chetan51 committed Dec 16, 2015
2 parents 4257b1f + 0d1fcc0 commit 884baab
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 884baab

Please sign in to comment.