{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/stat/pulls/comments/84614169","pull_request_review_id":5380464,"id":84614169,"diff_hunk":"@@ -836,33 +837,89 @@ var linearRegressionTests = []struct {\n \n \t\ttol: 1e-5,\n \t},\n+\t{\n+\t\tname: \"x, y length mismatch\",\n+\n+\t\tx:       make([]float64, 3),\n+\t\ty:       make([]float64, 2),\n+\t\tweights: make([]float64, 3),\n+\t},\n+\t{\n+\t\tname: \"weights mismatch with x\",\n+\n+\t\tx:       make([]float64, 3),\n+\t\ty:       make([]float64, 3),\n+\t\tweights: make([]float64, 2),\n+\t},\n+\t{\n+\t\tname: \"x, y length mismatch and weights nil\",\n+\n+\t\tx:       make([]float64, 3),\n+\t\ty:       make([]float64, 2),\n+\t\tweights: nil,\n+\t},\n+\t{\n+\t\tname:    \"weights are nil\",\n+\t\tx:       []float64{12.0, 24.0, 21.0},\n+\t\ty:       []float64{1.0, 2.0, 3.0},\n+\t\tweights: nil,\n+\t},\n }\n \n func TestLinearRegression(t *testing.T) {\n \tfor _, test := range linearRegressionTests {\n-\t\talpha, beta := LinearRegression(test.x, test.y, test.weights, test.origin)\n-\t\tvar r float64\n-\t\tif test.origin {\n-\t\t\tr = RNoughtSquared(test.x, test.y, test.weights, beta)\n+\t\tif strings.Contains(test.name, \"mismatch\") {","path":"stat_test.go","position":47,"original_position":47,"commit_id":"4b126fce3470ec7c68008ac59b2756916b1e66fa","original_commit_id":"4b126fce3470ec7c68008ac59b2756916b1e66fa","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":"I'm not sure I understand. Only one panic field is needed, since they either all panic or they don't. It's just as easy to add a panic field, and it's much clearer. It seems like that field could be a direct replacement for the Contains call.","created_at":"2016-10-24T02:31:30Z","updated_at":"2016-10-24T02:31:30Z","html_url":"https://github.com/gonum/stat/pull/127#discussion_r84614169","pull_request_url":"https://api.github.com/repos/gonum/stat/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/gonum/stat/pulls/comments/84614169"},"html":{"href":"https://github.com/gonum/stat/pull/127#discussion_r84614169"},"pull_request":{"href":"https://api.github.com/repos/gonum/stat/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/stat/pulls/127","id":87702435,"html_url":"https://github.com/gonum/stat/pull/127","diff_url":"https://github.com/gonum/stat/pull/127.diff","patch_url":"https://github.com/gonum/stat/pull/127.patch","issue_url":"https://api.github.com/repos/gonum/stat/issues/127","number":127,"state":"open","locked":false,"title":"Added Panic tests for Regression Implementations","user":{"login":"Dawny33","id":4637008,"avatar_url":"https://avatars.githubusercontent.com/u/4637008?v=3","gravatar_id":"","url":"https://api.github.com/users/Dawny33","html_url":"https://github.com/Dawny33","followers_url":"https://api.github.com/users/Dawny33/followers","following_url":"https://api.github.com/users/Dawny33/following{/other_user}","gists_url":"https://api.github.com/users/Dawny33/gists{/gist_id}","starred_url":"https://api.github.com/users/Dawny33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dawny33/subscriptions","organizations_url":"https://api.github.com/users/Dawny33/orgs","repos_url":"https://api.github.com/users/Dawny33/repos","events_url":"https://api.github.com/users/Dawny33/events{/privacy}","received_events_url":"https://api.github.com/users/Dawny33/received_events","type":"User","site_admin":false},"body":"Addresses https://github.com/gonum/stat/issues/126","created_at":"2016-10-03T11:43:43Z","updated_at":"2016-10-24T02:31:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"638b3d3afd0915e322da2c7130e3edf2fcae863b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gonum/stat/pulls/127/commits","review_comments_url":"https://api.github.com/repos/gonum/stat/pulls/127/comments","review_comment_url":"https://api.github.com/repos/gonum/stat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/stat/issues/127/comments","statuses_url":"https://api.github.com/repos/gonum/stat/statuses/4b126fce3470ec7c68008ac59b2756916b1e66fa","head":{"label":"Dawny33:master","ref":"master","sha":"4b126fce3470ec7c68008ac59b2756916b1e66fa","user":{"login":"Dawny33","id":4637008,"avatar_url":"https://avatars.githubusercontent.com/u/4637008?v=3","gravatar_id":"","url":"https://api.github.com/users/Dawny33","html_url":"https://github.com/Dawny33","followers_url":"https://api.github.com/users/Dawny33/followers","following_url":"https://api.github.com/users/Dawny33/following{/other_user}","gists_url":"https://api.github.com/users/Dawny33/gists{/gist_id}","starred_url":"https://api.github.com/users/Dawny33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dawny33/subscriptions","organizations_url":"https://api.github.com/users/Dawny33/orgs","repos_url":"https://api.github.com/users/Dawny33/repos","events_url":"https://api.github.com/users/Dawny33/events{/privacy}","received_events_url":"https://api.github.com/users/Dawny33/received_events","type":"User","site_admin":false},"repo":{"id":69864858,"name":"stat","full_name":"Dawny33/stat","owner":{"login":"Dawny33","id":4637008,"avatar_url":"https://avatars.githubusercontent.com/u/4637008?v=3","gravatar_id":"","url":"https://api.github.com/users/Dawny33","html_url":"https://github.com/Dawny33","followers_url":"https://api.github.com/users/Dawny33/followers","following_url":"https://api.github.com/users/Dawny33/following{/other_user}","gists_url":"https://api.github.com/users/Dawny33/gists{/gist_id}","starred_url":"https://api.github.com/users/Dawny33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dawny33/subscriptions","organizations_url":"https://api.github.com/users/Dawny33/orgs","repos_url":"https://api.github.com/users/Dawny33/repos","events_url":"https://api.github.com/users/Dawny33/events{/privacy}","received_events_url":"https://api.github.com/users/Dawny33/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dawny33/stat","description":"Statistics package for Go","fork":true,"url":"https://api.github.com/repos/Dawny33/stat","forks_url":"https://api.github.com/repos/Dawny33/stat/forks","keys_url":"https://api.github.com/repos/Dawny33/stat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dawny33/stat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dawny33/stat/teams","hooks_url":"https://api.github.com/repos/Dawny33/stat/hooks","issue_events_url":"https://api.github.com/repos/Dawny33/stat/issues/events{/number}","events_url":"https://api.github.com/repos/Dawny33/stat/events","assignees_url":"https://api.github.com/repos/Dawny33/stat/assignees{/user}","branches_url":"https://api.github.com/repos/Dawny33/stat/branches{/branch}","tags_url":"https://api.github.com/repos/Dawny33/stat/tags","blobs_url":"https://api.github.com/repos/Dawny33/stat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dawny33/stat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dawny33/stat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dawny33/stat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dawny33/stat/statuses/{sha}","languages_url":"https://api.github.com/repos/Dawny33/stat/languages","stargazers_url":"https://api.github.com/repos/Dawny33/stat/stargazers","contributors_url":"https://api.github.com/repos/Dawny33/stat/contributors","subscribers_url":"https://api.github.com/repos/Dawny33/stat/subscribers","subscription_url":"https://api.github.com/repos/Dawny33/stat/subscription","commits_url":"https://api.github.com/repos/Dawny33/stat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dawny33/stat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dawny33/stat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dawny33/stat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dawny33/stat/contents/{+path}","compare_url":"https://api.github.com/repos/Dawny33/stat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dawny33/stat/merges","archive_url":"https://api.github.com/repos/Dawny33/stat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dawny33/stat/downloads","issues_url":"https://api.github.com/repos/Dawny33/stat/issues{/number}","pulls_url":"https://api.github.com/repos/Dawny33/stat/pulls{/number}","milestones_url":"https://api.github.com/repos/Dawny33/stat/milestones{/number}","notifications_url":"https://api.github.com/repos/Dawny33/stat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dawny33/stat/labels{/name}","releases_url":"https://api.github.com/repos/Dawny33/stat/releases{/id}","deployments_url":"https://api.github.com/repos/Dawny33/stat/deployments","created_at":"2016-10-03T11:31:10Z","updated_at":"2016-10-03T11:31:12Z","pushed_at":"2016-10-05T04:47:36Z","git_url":"git://github.com/Dawny33/stat.git","ssh_url":"git@github.com:Dawny33/stat.git","clone_url":"https://github.com/Dawny33/stat.git","svn_url":"https://github.com/Dawny33/stat","homepage":"","size":407,"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":"fa6e6b1a6a5734a159060340c0a0c177cf1d1ff5","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-10-20T06:23:48Z","pushed_at":"2016-10-21T20:34:23Z","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":583,"stargazers_count":155,"watchers_count":155,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":27,"forks":15,"open_issues":27,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/stat/pulls/127"},"html":{"href":"https://github.com/gonum/stat/pull/127"},"issue":{"href":"https://api.github.com/repos/gonum/stat/issues/127"},"comments":{"href":"https://api.github.com/repos/gonum/stat/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/stat/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/stat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/stat/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/stat/statuses/4b126fce3470ec7c68008ac59b2756916b1e66fa"}}}}
{"actor":{"display_login":"btracey"}}