{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/stat/pulls/comments/51217260","id":51217260,"diff_hunk":"@@ -76,32 +76,28 @@ func CDF(q float64, c CumulantKind, x, weights []float64) float64 {\n \t\treturn 1\n \t}\n \n-\tvar sumWeights float64\n-\tif weights == nil {\n-\t\tsumWeights = float64(len(x))\n-\t} else {\n-\t\tsumWeights = floats.Sum(weights)\n-\t}\n+\tsumWeights := floats.Sum(weights)","path":"stat.go","position":10,"original_position":10,"commit_id":"512332349c57de8d8f83c633df38b02716698a76","original_commit_id":"512332349c57de8d8f83c633df38b02716698a76","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"body":"But they don't pass?","created_at":"2016-01-29T01:57:22Z","updated_at":"2016-01-29T01:57:22Z","html_url":"https://github.com/gonum/stat/pull/78#discussion_r51217260","pull_request_url":"https://api.github.com/repos/gonum/stat/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/gonum/stat/pulls/comments/51217260"},"html":{"href":"https://github.com/gonum/stat/pull/78#discussion_r51217260"},"pull_request":{"href":"https://api.github.com/repos/gonum/stat/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/stat/pulls/78","id":57595029,"html_url":"https://github.com/gonum/stat/pull/78","diff_url":"https://github.com/gonum/stat/pull/78.diff","patch_url":"https://github.com/gonum/stat/pull/78.patch","issue_url":"https://api.github.com/repos/gonum/stat/issues/78","number":78,"state":"open","locked":false,"title":"Simplified some functions","user":{"login":"darrenmcc","id":1442631,"avatar_url":"https://avatars.githubusercontent.com/u/1442631?v=3","gravatar_id":"","url":"https://api.github.com/users/darrenmcc","html_url":"https://github.com/darrenmcc","followers_url":"https://api.github.com/users/darrenmcc/followers","following_url":"https://api.github.com/users/darrenmcc/following{/other_user}","gists_url":"https://api.github.com/users/darrenmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/darrenmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrenmcc/subscriptions","organizations_url":"https://api.github.com/users/darrenmcc/orgs","repos_url":"https://api.github.com/users/darrenmcc/repos","events_url":"https://api.github.com/users/darrenmcc/events{/privacy}","received_events_url":"https://api.github.com/users/darrenmcc/received_events","type":"User","site_admin":false},"body":"Modified some functions that I saw that weren't idiomatic Go during a cursory glance. Code is slightly simpler now. I didn't go through every file so there may be more instances that I didn't see. ","created_at":"2016-01-29T01:40:02Z","updated_at":"2016-01-29T01:57:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e10ef228348cff5af0c7c6b9913d68b200e31f2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/stat/pulls/78/commits","review_comments_url":"https://api.github.com/repos/gonum/stat/pulls/78/comments","review_comment_url":"https://api.github.com/repos/gonum/stat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/stat/issues/78/comments","statuses_url":"https://api.github.com/repos/gonum/stat/statuses/512332349c57de8d8f83c633df38b02716698a76","head":{"label":"darrenmcc:simplify-prob","ref":"simplify-prob","sha":"512332349c57de8d8f83c633df38b02716698a76","user":{"login":"darrenmcc","id":1442631,"avatar_url":"https://avatars.githubusercontent.com/u/1442631?v=3","gravatar_id":"","url":"https://api.github.com/users/darrenmcc","html_url":"https://github.com/darrenmcc","followers_url":"https://api.github.com/users/darrenmcc/followers","following_url":"https://api.github.com/users/darrenmcc/following{/other_user}","gists_url":"https://api.github.com/users/darrenmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/darrenmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrenmcc/subscriptions","organizations_url":"https://api.github.com/users/darrenmcc/orgs","repos_url":"https://api.github.com/users/darrenmcc/repos","events_url":"https://api.github.com/users/darrenmcc/events{/privacy}","received_events_url":"https://api.github.com/users/darrenmcc/received_events","type":"User","site_admin":false},"repo":{"id":50626536,"name":"stat","full_name":"darrenmcc/stat","owner":{"login":"darrenmcc","id":1442631,"avatar_url":"https://avatars.githubusercontent.com/u/1442631?v=3","gravatar_id":"","url":"https://api.github.com/users/darrenmcc","html_url":"https://github.com/darrenmcc","followers_url":"https://api.github.com/users/darrenmcc/followers","following_url":"https://api.github.com/users/darrenmcc/following{/other_user}","gists_url":"https://api.github.com/users/darrenmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/darrenmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrenmcc/subscriptions","organizations_url":"https://api.github.com/users/darrenmcc/orgs","repos_url":"https://api.github.com/users/darrenmcc/repos","events_url":"https://api.github.com/users/darrenmcc/events{/privacy}","received_events_url":"https://api.github.com/users/darrenmcc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/darrenmcc/stat","description":"Statistics package for Go","fork":true,"url":"https://api.github.com/repos/darrenmcc/stat","forks_url":"https://api.github.com/repos/darrenmcc/stat/forks","keys_url":"https://api.github.com/repos/darrenmcc/stat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/darrenmcc/stat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/darrenmcc/stat/teams","hooks_url":"https://api.github.com/repos/darrenmcc/stat/hooks","issue_events_url":"https://api.github.com/repos/darrenmcc/stat/issues/events{/number}","events_url":"https://api.github.com/repos/darrenmcc/stat/events","assignees_url":"https://api.github.com/repos/darrenmcc/stat/assignees{/user}","branches_url":"https://api.github.com/repos/darrenmcc/stat/branches{/branch}","tags_url":"https://api.github.com/repos/darrenmcc/stat/tags","blobs_url":"https://api.github.com/repos/darrenmcc/stat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/darrenmcc/stat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/darrenmcc/stat/git/refs{/sha}","trees_url":"https://api.github.com/repos/darrenmcc/stat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/darrenmcc/stat/statuses/{sha}","languages_url":"https://api.github.com/repos/darrenmcc/stat/languages","stargazers_url":"https://api.github.com/repos/darrenmcc/stat/stargazers","contributors_url":"https://api.github.com/repos/darrenmcc/stat/contributors","subscribers_url":"https://api.github.com/repos/darrenmcc/stat/subscribers","subscription_url":"https://api.github.com/repos/darrenmcc/stat/subscription","commits_url":"https://api.github.com/repos/darrenmcc/stat/commits{/sha}","git_commits_url":"https://api.github.com/repos/darrenmcc/stat/git/commits{/sha}","comments_url":"https://api.github.com/repos/darrenmcc/stat/comments{/number}","issue_comment_url":"https://api.github.com/repos/darrenmcc/stat/issues/comments{/number}","contents_url":"https://api.github.com/repos/darrenmcc/stat/contents/{+path}","compare_url":"https://api.github.com/repos/darrenmcc/stat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/darrenmcc/stat/merges","archive_url":"https://api.github.com/repos/darrenmcc/stat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/darrenmcc/stat/downloads","issues_url":"https://api.github.com/repos/darrenmcc/stat/issues{/number}","pulls_url":"https://api.github.com/repos/darrenmcc/stat/pulls{/number}","milestones_url":"https://api.github.com/repos/darrenmcc/stat/milestones{/number}","notifications_url":"https://api.github.com/repos/darrenmcc/stat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/darrenmcc/stat/labels{/name}","releases_url":"https://api.github.com/repos/darrenmcc/stat/releases{/id}","deployments_url":"https://api.github.com/repos/darrenmcc/stat/deployments","created_at":"2016-01-29T01:04:20Z","updated_at":"2016-01-29T01:04:21Z","pushed_at":"2016-01-29T01:36:12Z","git_url":"git://github.com/darrenmcc/stat.git","ssh_url":"git@github.com:darrenmcc/stat.git","clone_url":"https://github.com/darrenmcc/stat.git","svn_url":"https://github.com/darrenmcc/stat","homepage":"","size":322,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"gonum:master","ref":"master","sha":"2bff2c7974fcafe2c785537d5e3974b95632a475","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":22622955,"name":"stat","full_name":"gonum/stat","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/stat","description":"Statistics package for Go","fork":false,"url":"https://api.github.com/repos/gonum/stat","forks_url":"https://api.github.com/repos/gonum/stat/forks","keys_url":"https://api.github.com/repos/gonum/stat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/stat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/stat/teams","hooks_url":"https://api.github.com/repos/gonum/stat/hooks","issue_events_url":"https://api.github.com/repos/gonum/stat/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/stat/events","assignees_url":"https://api.github.com/repos/gonum/stat/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/stat/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/stat/tags","blobs_url":"https://api.github.com/repos/gonum/stat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/stat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/stat/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/stat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/stat/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/stat/languages","stargazers_url":"https://api.github.com/repos/gonum/stat/stargazers","contributors_url":"https://api.github.com/repos/gonum/stat/contributors","subscribers_url":"https://api.github.com/repos/gonum/stat/subscribers","subscription_url":"https://api.github.com/repos/gonum/stat/subscription","commits_url":"https://api.github.com/repos/gonum/stat/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/stat/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/stat/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/stat/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/stat/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/stat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/stat/merges","archive_url":"https://api.github.com/repos/gonum/stat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/stat/downloads","issues_url":"https://api.github.com/repos/gonum/stat/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/stat/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/stat/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/stat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/stat/labels{/name}","releases_url":"https://api.github.com/repos/gonum/stat/releases{/id}","deployments_url":"https://api.github.com/repos/gonum/stat/deployments","created_at":"2014-08-04T23:07:41Z","updated_at":"2016-01-29T00:47:16Z","pushed_at":"2016-01-29T01:40:03Z","git_url":"git://github.com/gonum/stat.git","ssh_url":"git@github.com:gonum/stat.git","clone_url":"https://github.com/gonum/stat.git","svn_url":"https://github.com/gonum/stat","homepage":"","size":335,"stargazers_count":60,"watchers_count":60,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":13,"forks":12,"open_issues":13,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/stat/pulls/78"},"html":{"href":"https://github.com/gonum/stat/pull/78"},"issue":{"href":"https://api.github.com/repos/gonum/stat/issues/78"},"comments":{"href":"https://api.github.com/repos/gonum/stat/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/stat/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/stat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/stat/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/stat/statuses/512332349c57de8d8f83c633df38b02716698a76"}}}}