{"action":"created","comment":{"url":"https://api.github.com/repos/numenta/nupic/pulls/comments/32451237","id":32451237,"diff_hunk":"@@ -506,6 +517,16 @@ def _compute(self, inputs, outputs):\n       size = activeLearnCells.shape[0] * activeLearnCells.shape[1]\n       outputs['lrnActiveStateT'][:] = activeLearnCells.reshape(size)\n \n+    if self.computePredictedActiveCellIndices:\n+      # Reshape so we are dealing with 1D arrays\n+      activeState = self._tfdr.getActiveState().reshape(-1).astype('float32')\n+      predictedState = self._tfdr.getPredictedState().reshape(-1).astype('float32')\n+      activeIndices = set(numpy.where(activeState != 0)[0])\n+      predictedIndices= set(numpy.where(predictedState != 0)[0])\n+      predictedActiveIndices = activeIndices & predictedIndices\n+      outputs[\"activeCellsIndices\"] = numpy.array(list(activeIndices), dtype=int)","path":"nupic/regions/TPRegion.py","position":50,"original_position":50,"commit_id":"b88432c45d62b12bc1d904b97c0dd1fdbe7f9582","original_commit_id":"b21254f4646f3bd1ff13d8dee7b95baa3d868a8e","user":{"login":"scottpurdy","id":239726,"avatar_url":"https://avatars.githubusercontent.com/u/239726?v=3","gravatar_id":"","url":"https://api.github.com/users/scottpurdy","html_url":"https://github.com/scottpurdy","followers_url":"https://api.github.com/users/scottpurdy/followers","following_url":"https://api.github.com/users/scottpurdy/following{/other_user}","gists_url":"https://api.github.com/users/scottpurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/scottpurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottpurdy/subscriptions","organizations_url":"https://api.github.com/users/scottpurdy/orgs","repos_url":"https://api.github.com/users/scottpurdy/repos","events_url":"https://api.github.com/users/scottpurdy/events{/privacy}","received_events_url":"https://api.github.com/users/scottpurdy/received_events","type":"User","site_admin":false},"body":"You are overriding the array in `output[\"activeCellsIndices\"]` with a copy of `activeIndices`, right? I think overriding it will cause issues, you should just be modifying the existing array.","created_at":"2015-06-15T18:30:38Z","updated_at":"2015-06-15T18:30:38Z","html_url":"https://github.com/numenta/nupic/pull/2206#discussion_r32451237","pull_request_url":"https://api.github.com/repos/numenta/nupic/pulls/2206","_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic/pulls/comments/32451237"},"html":{"href":"https://github.com/numenta/nupic/pull/2206#discussion_r32451237"},"pull_request":{"href":"https://api.github.com/repos/numenta/nupic/pulls/2206"}}},"pull_request":{"url":"https://api.github.com/repos/numenta/nupic/pulls/2206","id":37513167,"html_url":"https://github.com/numenta/nupic/pull/2206","diff_url":"https://github.com/numenta/nupic/pull/2206.diff","patch_url":"https://github.com/numenta/nupic/pull/2206.patch","issue_url":"https://api.github.com/repos/numenta/nupic/issues/2206","number":2206,"state":"open","locked":false,"title":"Modified TPRegion to output the indices needed for the Union Pooler","user":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"body":"The Union Pooler needs to know the active indices from the output of the temporal memory and which ones were predicted and active.  Originally, TPRegion only outputted the active bits SDR.  Now, it outputs the indices of the active bits and the indices of the active bits that were predicted.\r\n\r\nFor numenta/nupic.research#69\r\nFixes #2081\r\n\r\n@ryan @scottpurdy ","created_at":"2015-06-11T21:56:59Z","updated_at":"2015-06-15T18:30:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d34dde2bddc8445dd95125770406b80c8f55edf2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numenta/nupic/pulls/2206/commits","review_comments_url":"https://api.github.com/repos/numenta/nupic/pulls/2206/comments","review_comment_url":"https://api.github.com/repos/numenta/nupic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/2206/comments","statuses_url":"https://api.github.com/repos/numenta/nupic/statuses/b88432c45d62b12bc1d904b97c0dd1fdbe7f9582","head":{"label":"akhilaananthram:temporalmemory_region","ref":"temporalmemory_region","sha":"b88432c45d62b12bc1d904b97c0dd1fdbe7f9582","user":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"repo":{"id":36316431,"name":"nupic","full_name":"akhilaananthram/nupic","owner":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akhilaananthram/nupic","description":"Numenta Platform for Intelligent Computing: a brain-inspired machine intelligence platform, and biologically accurate neural network based on cortical learning algorithms.","fork":true,"url":"https://api.github.com/repos/akhilaananthram/nupic","forks_url":"https://api.github.com/repos/akhilaananthram/nupic/forks","keys_url":"https://api.github.com/repos/akhilaananthram/nupic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akhilaananthram/nupic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akhilaananthram/nupic/teams","hooks_url":"https://api.github.com/repos/akhilaananthram/nupic/hooks","issue_events_url":"https://api.github.com/repos/akhilaananthram/nupic/issues/events{/number}","events_url":"https://api.github.com/repos/akhilaananthram/nupic/events","assignees_url":"https://api.github.com/repos/akhilaananthram/nupic/assignees{/user}","branches_url":"https://api.github.com/repos/akhilaananthram/nupic/branches{/branch}","tags_url":"https://api.github.com/repos/akhilaananthram/nupic/tags","blobs_url":"https://api.github.com/repos/akhilaananthram/nupic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akhilaananthram/nupic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akhilaananthram/nupic/git/refs{/sha}","trees_url":"https://api.github.com/repos/akhilaananthram/nupic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akhilaananthram/nupic/statuses/{sha}","languages_url":"https://api.github.com/repos/akhilaananthram/nupic/languages","stargazers_url":"https://api.github.com/repos/akhilaananthram/nupic/stargazers","contributors_url":"https://api.github.com/repos/akhilaananthram/nupic/contributors","subscribers_url":"https://api.github.com/repos/akhilaananthram/nupic/subscribers","subscription_url":"https://api.github.com/repos/akhilaananthram/nupic/subscription","commits_url":"https://api.github.com/repos/akhilaananthram/nupic/commits{/sha}","git_commits_url":"https://api.github.com/repos/akhilaananthram/nupic/git/commits{/sha}","comments_url":"https://api.github.com/repos/akhilaananthram/nupic/comments{/number}","issue_comment_url":"https://api.github.com/repos/akhilaananthram/nupic/issues/comments{/number}","contents_url":"https://api.github.com/repos/akhilaananthram/nupic/contents/{+path}","compare_url":"https://api.github.com/repos/akhilaananthram/nupic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akhilaananthram/nupic/merges","archive_url":"https://api.github.com/repos/akhilaananthram/nupic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akhilaananthram/nupic/downloads","issues_url":"https://api.github.com/repos/akhilaananthram/nupic/issues{/number}","pulls_url":"https://api.github.com/repos/akhilaananthram/nupic/pulls{/number}","milestones_url":"https://api.github.com/repos/akhilaananthram/nupic/milestones{/number}","notifications_url":"https://api.github.com/repos/akhilaananthram/nupic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akhilaananthram/nupic/labels{/name}","releases_url":"https://api.github.com/repos/akhilaananthram/nupic/releases{/id}","created_at":"2015-05-26T18:44:19Z","updated_at":"2015-05-26T18:44:28Z","pushed_at":"2015-06-15T17:39:38Z","git_url":"git://github.com/akhilaananthram/nupic.git","ssh_url":"git@github.com:akhilaananthram/nupic.git","clone_url":"https://github.com/akhilaananthram/nupic.git","svn_url":"https://github.com/akhilaananthram/nupic","homepage":"http://numenta.org/","size":140666,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"numenta:master","ref":"master","sha":"8a8d42771f260a77fb93dc395c3af85f156458a4","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":9252533,"name":"nupic","full_name":"numenta/nupic","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/nupic","description":"Numenta Platform for Intelligent Computing: a brain-inspired machine intelligence platform, and biologically accurate neural network based on cortical learning algorithms.","fork":false,"url":"https://api.github.com/repos/numenta/nupic","forks_url":"https://api.github.com/repos/numenta/nupic/forks","keys_url":"https://api.github.com/repos/numenta/nupic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/nupic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/nupic/teams","hooks_url":"https://api.github.com/repos/numenta/nupic/hooks","issue_events_url":"https://api.github.com/repos/numenta/nupic/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/nupic/events","assignees_url":"https://api.github.com/repos/numenta/nupic/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/nupic/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/nupic/tags","blobs_url":"https://api.github.com/repos/numenta/nupic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/nupic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/nupic/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/nupic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/nupic/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/nupic/languages","stargazers_url":"https://api.github.com/repos/numenta/nupic/stargazers","contributors_url":"https://api.github.com/repos/numenta/nupic/contributors","subscribers_url":"https://api.github.com/repos/numenta/nupic/subscribers","subscription_url":"https://api.github.com/repos/numenta/nupic/subscription","commits_url":"https://api.github.com/repos/numenta/nupic/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/nupic/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/nupic/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/nupic/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/nupic/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/nupic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/nupic/merges","archive_url":"https://api.github.com/repos/numenta/nupic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/nupic/downloads","issues_url":"https://api.github.com/repos/numenta/nupic/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/nupic/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/nupic/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/nupic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/nupic/labels{/name}","releases_url":"https://api.github.com/repos/numenta/nupic/releases{/id}","created_at":"2013-04-05T23:14:27Z","updated_at":"2015-06-14T12:32:06Z","pushed_at":"2015-06-15T17:24:18Z","git_url":"git://github.com/numenta/nupic.git","ssh_url":"git@github.com:numenta/nupic.git","clone_url":"https://github.com/numenta/nupic.git","svn_url":"https://github.com/numenta/nupic","homepage":"http://numenta.org/","size":304319,"stargazers_count":3186,"watchers_count":3186,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":848,"mirror_url":null,"open_issues_count":388,"forks":848,"open_issues":388,"watchers":3186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic/pulls/2206"},"html":{"href":"https://github.com/numenta/nupic/pull/2206"},"issue":{"href":"https://api.github.com/repos/numenta/nupic/issues/2206"},"comments":{"href":"https://api.github.com/repos/numenta/nupic/issues/2206/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/nupic/pulls/2206/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/nupic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/nupic/pulls/2206/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/nupic/statuses/b88432c45d62b12bc1d904b97c0dd1fdbe7f9582"}}}}