{"comment":{"url":"https://api.github.com/repos/BoltzmannBrain/nupic/comments/12459020","html_url":"https://github.com/BoltzmannBrain/nupic/commit/5a8bb34670a28920bed0c337cf4f6bad52e79535#commitcomment-12459020","id":12459020,"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},"position":125,"line":307,"path":"nupic/regions/RecordSensor.py","commit_id":"5a8bb34670a28920bed0c337cf4f6bad52e79535","created_at":"2015-07-31T02:51:08Z","updated_at":"2015-07-31T02:51:08Z","body":"I'd do `categories[:len(output)]` which will give you the shorter of the two without having to zip up the output elements that aren't used in the loop.\r\n\r\nAnd you probably have a good reason for it but why use put instead of doing:\r\n\r\n`output[i] = cat`"}}