{"action":"created","issue":{"url":"https://api.github.com/repos/nengo/nengo/issues/552","labels_url":"https://api.github.com/repos/nengo/nengo/issues/552/labels{/name}","comments_url":"https://api.github.com/repos/nengo/nengo/issues/552/comments","events_url":"https://api.github.com/repos/nengo/nengo/issues/552/events","html_url":"https://github.com/nengo/nengo/pull/552","id":49252096,"number":552,"title":"Utils for doing function space stuff in nengo","user":{"login":"youssefzaky","id":3183788,"avatar_url":"https://avatars.githubusercontent.com/u/3183788?v=3","gravatar_id":"","url":"https://api.github.com/users/youssefzaky","html_url":"https://github.com/youssefzaky","followers_url":"https://api.github.com/users/youssefzaky/followers","following_url":"https://api.github.com/users/youssefzaky/following{/other_user}","gists_url":"https://api.github.com/users/youssefzaky/gists{/gist_id}","starred_url":"https://api.github.com/users/youssefzaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youssefzaky/subscriptions","organizations_url":"https://api.github.com/users/youssefzaky/orgs","repos_url":"https://api.github.com/users/youssefzaky/repos","events_url":"https://api.github.com/users/youssefzaky/events{/privacy}","received_events_url":"https://api.github.com/users/youssefzaky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nengo/nengo/labels/needs%20review","name":"needs review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nengo/nengo/milestones/8","html_url":"https://github.com/nengo/nengo/milestones/2.1.1%20release","labels_url":"https://api.github.com/repos/nengo/nengo/milestones/8/labels","id":1145351,"number":8,"title":"2.1.1 release","description":"","creator":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?v=3","gravatar_id":"","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2015-06-02T15:54:38Z","updated_at":"2015-09-21T02:11:00Z","due_on":null,"closed_at":null},"comments":19,"created_at":"2014-11-18T16:13:29Z","updated_at":"2015-11-20T15:56:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nengo/nengo/pulls/552","html_url":"https://github.com/nengo/nengo/pull/552","diff_url":"https://github.com/nengo/nengo/pull/552.diff","patch_url":"https://github.com/nengo/nengo/pull/552.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/nengo/nengo/issues/comments/158440519","html_url":"https://github.com/nengo/nengo/pull/552#issuecomment-158440519","issue_url":"https://api.github.com/repos/nengo/nengo/issues/552","id":158440519,"user":{"login":"youssefzaky","id":3183788,"avatar_url":"https://avatars.githubusercontent.com/u/3183788?v=3","gravatar_id":"","url":"https://api.github.com/users/youssefzaky","html_url":"https://github.com/youssefzaky","followers_url":"https://api.github.com/users/youssefzaky/followers","following_url":"https://api.github.com/users/youssefzaky/following{/other_user}","gists_url":"https://api.github.com/users/youssefzaky/gists{/gist_id}","starred_url":"https://api.github.com/users/youssefzaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youssefzaky/subscriptions","organizations_url":"https://api.github.com/users/youssefzaky/orgs","repos_url":"https://api.github.com/users/youssefzaky/repos","events_url":"https://api.github.com/users/youssefzaky/events{/privacy}","received_events_url":"https://api.github.com/users/youssefzaky/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T15:56:09Z","updated_at":"2015-11-20T15:56:09Z","body":"I think this API is definitely is more straightforward and avoids the duplication you pointed out. When I first wrote the class I actually had it organized that way, with more functions being encapsulated in the class. I changed it when I came across the case where I had made functions my own way without sampling from distributions, and then wanted to use them. So I just made the class take these functions and moved methods out as helpers, instead of trying to make the class handle all the possible ways of defining functions.\r\n\r\nI'm not sure how common this use case is though, so maybe it's not worth the added complexity.\r\n\r\n"}}