Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup category encoder unit test(s) #2017

Conversation

oxtopus
Copy link
Contributor

@oxtopus oxtopus commented Apr 9, 2015

Fixes #2018. Work towards #2000.

@rhyolight
Copy link
Member

Added issue and updated description.

@@ -78,26 +79,30 @@ def testCategoryEncoder(self):
# ---------------------
# unknown category
output = e.encode("NA")
self.assertTrue((output == numpy.array([1,1,1,0,0,0,0,0,0,0,0,0], dtype=defaultDtype)).all())
expected = numpy.array([1,1,1,0,0,0,0,0,0,0,0,0], dtype=defaultDtype)
self.assertTrue(numpy.array_equal(output, expected))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like output and expected. They are more readable.

@david-ragazzi
Copy link
Contributor

👍

rhyolight added a commit that referenced this pull request May 6, 2015
…eanup-category

Cleanup category encoder unit test(s)
@rhyolight rhyolight merged commit 92760d6 into numenta:master May 6, 2015
mihail911 pushed a commit to mihail911/nupic that referenced this pull request Aug 5, 2015
…test-cleanup-category

Cleanup category encoder unit test(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial category unit test cleanup
3 participants