{"action":"created","comment":{"url":"https://api.github.com/repos/stan-dev/math/pulls/comments/218153398","pull_request_review_id":156029458,"id":218153398,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODE1MzM5OA==","diff_hunk":"@@ -49,17 +24,19 @@ inline typename std::vector<Eigen::Matrix<T_x, R, C>> divide_columns(\n  *\n  */\n template <typename T_x, typename T_v, int R, int C>\n-inline typename std::vector<Eigen::Matrix<T_x, R, C>> divide_columns(\n-    const std::vector<Eigen::Matrix<T_x, R, C>> &x,\n-    const std::vector<T_v> &vec) {\n+inline typename std::vector<\n+    Eigen::Matrix<typename return_type<T_x, T_v, double>::type, R, C>>\n+divide_columns(const std::vector<Eigen::Matrix<T_x, R, C>> &x,\n+               const std::vector<T_v> &vec) {\n   size_t N = x.size();\n   size_t D = x[0].size();\n   check_size_match(\"divide_columns\", \"x dimension\", D, \"vector\", vec.size());","path":"stan/math/prim/mat/fun/divide_columns.hpp","position":51,"original_position":51,"commit_id":"98eb55addec1dd94e9edb5e056e57c5753ae2341","original_commit_id":"3a5b9a8f8ec4bfd03cdb67499e054ee0fce35d71","user":{"login":"drezap","id":11656812,"node_id":"MDQ6VXNlcjExNjU2ODEy","avatar_url":"https://avatars2.githubusercontent.com/u/11656812?v=4","gravatar_id":"","url":"https://api.github.com/users/drezap","html_url":"https://github.com/drezap","followers_url":"https://api.github.com/users/drezap/followers","following_url":"https://api.github.com/users/drezap/following{/other_user}","gists_url":"https://api.github.com/users/drezap/gists{/gist_id}","starred_url":"https://api.github.com/users/drezap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drezap/subscriptions","organizations_url":"https://api.github.com/users/drezap/orgs","repos_url":"https://api.github.com/users/drezap/repos","events_url":"https://api.github.com/users/drezap/events{/privacy}","received_events_url":"https://api.github.com/users/drezap/received_events","type":"User","site_admin":false},"body":"good catch this is more robust","created_at":"2018-09-17T17:14:06Z","updated_at":"2018-09-17T17:14:06Z","html_url":"https://github.com/stan-dev/math/pull/982#discussion_r218153398","pull_request_url":"https://api.github.com/repos/stan-dev/math/pulls/982","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/stan-dev/math/pulls/comments/218153398"},"html":{"href":"https://github.com/stan-dev/math/pull/982#discussion_r218153398"},"pull_request":{"href":"https://api.github.com/repos/stan-dev/math/pulls/982"}},"in_reply_to_id":217151544},"pull_request":{"url":"https://api.github.com/repos/stan-dev/math/pulls/982","id":208225932,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MjI1OTMy","html_url":"https://github.com/stan-dev/math/pull/982","diff_url":"https://github.com/stan-dev/math/pull/982.diff","patch_url":"https://github.com/stan-dev/math/pull/982.patch","issue_url":"https://api.github.com/repos/stan-dev/math/issues/982","number":982,"state":"open","locked":false,"title":"update templating and remove uncessary stuff in divide columns","user":{"login":"drezap","id":11656812,"node_id":"MDQ6VXNlcjExNjU2ODEy","avatar_url":"https://avatars2.githubusercontent.com/u/11656812?v=4","gravatar_id":"","url":"https://api.github.com/users/drezap","html_url":"https://github.com/drezap","followers_url":"https://api.github.com/users/drezap/followers","following_url":"https://api.github.com/users/drezap/following{/other_user}","gists_url":"https://api.github.com/users/drezap/gists{/gist_id}","starred_url":"https://api.github.com/users/drezap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drezap/subscriptions","organizations_url":"https://api.github.com/users/drezap/orgs","repos_url":"https://api.github.com/users/drezap/repos","events_url":"https://api.github.com/users/drezap/events{/privacy}","received_events_url":"https://api.github.com/users/drezap/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nThis adds different templating to get stan models to compile with the divide columns function. More specifically, I used templating `Eigen::matrix<T_x, R, C>` instead of a broad `T_x`  for this object, and I removed the dividing columns by a scalar, as this is unnecessary and shouldn't be part of the library.\r\n\r\n## Tests\r\nSame tests as before are fine.\r\n\r\n## Side Effects\r\n\r\nAre there any side effects that we should be aware of?\r\n\r\n## Checklist\r\n\r\n- [x] Math issue #981 \r\n\r\n- [x] Copyright holder: Copyright 2018 Andre Zapico\r\n\r\n    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:\r\n      - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)\r\n      - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)\r\n\r\n- [x] the basic tests are passing\r\n\r\n    - unit tests pass (to run, use: `./runTests.py test/unit`)\r\n    - header checks pass, (`make test-headers`)\r\n    - docs build, (`make doxygen`)\r\n    - code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality) checks (`make cpplint`)\r\n\r\n- [x] the code is written in idiomatic C++ and changes are documented in the doxygen\r\n\r\n- [x] the new changes are tested\r\n","created_at":"2018-08-14T09:49:08Z","updated_at":"2018-09-17T17:14:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec042a8895ff7bfe86dded50b3b9f43c698a07f7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/stan-dev/math/pulls/982/commits","review_comments_url":"https://api.github.com/repos/stan-dev/math/pulls/982/comments","review_comment_url":"https://api.github.com/repos/stan-dev/math/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stan-dev/math/issues/982/comments","statuses_url":"https://api.github.com/repos/stan-dev/math/statuses/98eb55addec1dd94e9edb5e056e57c5753ae2341","head":{"label":"drezap:feature/issue-981-retemplate-matern52","ref":"feature/issue-981-retemplate-matern52","sha":"98eb55addec1dd94e9edb5e056e57c5753ae2341","user":{"login":"drezap","id":11656812,"node_id":"MDQ6VXNlcjExNjU2ODEy","avatar_url":"https://avatars2.githubusercontent.com/u/11656812?v=4","gravatar_id":"","url":"https://api.github.com/users/drezap","html_url":"https://github.com/drezap","followers_url":"https://api.github.com/users/drezap/followers","following_url":"https://api.github.com/users/drezap/following{/other_user}","gists_url":"https://api.github.com/users/drezap/gists{/gist_id}","starred_url":"https://api.github.com/users/drezap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drezap/subscriptions","organizations_url":"https://api.github.com/users/drezap/orgs","repos_url":"https://api.github.com/users/drezap/repos","events_url":"https://api.github.com/users/drezap/events{/privacy}","received_events_url":"https://api.github.com/users/drezap/received_events","type":"User","site_admin":false},"repo":{"id":117373526,"node_id":"MDEwOlJlcG9zaXRvcnkxMTczNzM1MjY=","name":"math","full_name":"drezap/math","private":false,"owner":{"login":"drezap","id":11656812,"node_id":"MDQ6VXNlcjExNjU2ODEy","avatar_url":"https://avatars2.githubusercontent.com/u/11656812?v=4","gravatar_id":"","url":"https://api.github.com/users/drezap","html_url":"https://github.com/drezap","followers_url":"https://api.github.com/users/drezap/followers","following_url":"https://api.github.com/users/drezap/following{/other_user}","gists_url":"https://api.github.com/users/drezap/gists{/gist_id}","starred_url":"https://api.github.com/users/drezap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drezap/subscriptions","organizations_url":"https://api.github.com/users/drezap/orgs","repos_url":"https://api.github.com/users/drezap/repos","events_url":"https://api.github.com/users/drezap/events{/privacy}","received_events_url":"https://api.github.com/users/drezap/received_events","type":"User","site_admin":false},"html_url":"https://github.com/drezap/math","description":"Stan Math Library","fork":true,"url":"https://api.github.com/repos/drezap/math","forks_url":"https://api.github.com/repos/drezap/math/forks","keys_url":"https://api.github.com/repos/drezap/math/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drezap/math/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drezap/math/teams","hooks_url":"https://api.github.com/repos/drezap/math/hooks","issue_events_url":"https://api.github.com/repos/drezap/math/issues/events{/number}","events_url":"https://api.github.com/repos/drezap/math/events","assignees_url":"https://api.github.com/repos/drezap/math/assignees{/user}","branches_url":"https://api.github.com/repos/drezap/math/branches{/branch}","tags_url":"https://api.github.com/repos/drezap/math/tags","blobs_url":"https://api.github.com/repos/drezap/math/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drezap/math/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drezap/math/git/refs{/sha}","trees_url":"https://api.github.com/repos/drezap/math/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drezap/math/statuses/{sha}","languages_url":"https://api.github.com/repos/drezap/math/languages","stargazers_url":"https://api.github.com/repos/drezap/math/stargazers","contributors_url":"https://api.github.com/repos/drezap/math/contributors","subscribers_url":"https://api.github.com/repos/drezap/math/subscribers","subscription_url":"https://api.github.com/repos/drezap/math/subscription","commits_url":"https://api.github.com/repos/drezap/math/commits{/sha}","git_commits_url":"https://api.github.com/repos/drezap/math/git/commits{/sha}","comments_url":"https://api.github.com/repos/drezap/math/comments{/number}","issue_comment_url":"https://api.github.com/repos/drezap/math/issues/comments{/number}","contents_url":"https://api.github.com/repos/drezap/math/contents/{+path}","compare_url":"https://api.github.com/repos/drezap/math/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drezap/math/merges","archive_url":"https://api.github.com/repos/drezap/math/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drezap/math/downloads","issues_url":"https://api.github.com/repos/drezap/math/issues{/number}","pulls_url":"https://api.github.com/repos/drezap/math/pulls{/number}","milestones_url":"https://api.github.com/repos/drezap/math/milestones{/number}","notifications_url":"https://api.github.com/repos/drezap/math/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drezap/math/labels{/name}","releases_url":"https://api.github.com/repos/drezap/math/releases{/id}","deployments_url":"https://api.github.com/repos/drezap/math/deployments","created_at":"2018-01-13T19:50:45Z","updated_at":"2018-08-30T15:11:31Z","pushed_at":"2018-09-13T00:25:41Z","git_url":"git://github.com/drezap/math.git","ssh_url":"git@github.com:drezap/math.git","clone_url":"https://github.com/drezap/math.git","svn_url":"https://github.com/drezap/math","homepage":null,"size":255480,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"stan-dev:develop","ref":"develop","sha":"159f3dfed0c7c88debf8a101f061c1f70a8ded46","user":{"login":"stan-dev","id":3374820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzQ4MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/3374820?v=4","gravatar_id":"","url":"https://api.github.com/users/stan-dev","html_url":"https://github.com/stan-dev","followers_url":"https://api.github.com/users/stan-dev/followers","following_url":"https://api.github.com/users/stan-dev/following{/other_user}","gists_url":"https://api.github.com/users/stan-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-dev/subscriptions","organizations_url":"https://api.github.com/users/stan-dev/orgs","repos_url":"https://api.github.com/users/stan-dev/repos","events_url":"https://api.github.com/users/stan-dev/events{/privacy}","received_events_url":"https://api.github.com/users/stan-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":38388440,"node_id":"MDEwOlJlcG9zaXRvcnkzODM4ODQ0MA==","name":"math","full_name":"stan-dev/math","private":false,"owner":{"login":"stan-dev","id":3374820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzQ4MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/3374820?v=4","gravatar_id":"","url":"https://api.github.com/users/stan-dev","html_url":"https://github.com/stan-dev","followers_url":"https://api.github.com/users/stan-dev/followers","following_url":"https://api.github.com/users/stan-dev/following{/other_user}","gists_url":"https://api.github.com/users/stan-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-dev/subscriptions","organizations_url":"https://api.github.com/users/stan-dev/orgs","repos_url":"https://api.github.com/users/stan-dev/repos","events_url":"https://api.github.com/users/stan-dev/events{/privacy}","received_events_url":"https://api.github.com/users/stan-dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/stan-dev/math","description":"Stan Math Library","fork":false,"url":"https://api.github.com/repos/stan-dev/math","forks_url":"https://api.github.com/repos/stan-dev/math/forks","keys_url":"https://api.github.com/repos/stan-dev/math/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stan-dev/math/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stan-dev/math/teams","hooks_url":"https://api.github.com/repos/stan-dev/math/hooks","issue_events_url":"https://api.github.com/repos/stan-dev/math/issues/events{/number}","events_url":"https://api.github.com/repos/stan-dev/math/events","assignees_url":"https://api.github.com/repos/stan-dev/math/assignees{/user}","branches_url":"https://api.github.com/repos/stan-dev/math/branches{/branch}","tags_url":"https://api.github.com/repos/stan-dev/math/tags","blobs_url":"https://api.github.com/repos/stan-dev/math/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stan-dev/math/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stan-dev/math/git/refs{/sha}","trees_url":"https://api.github.com/repos/stan-dev/math/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stan-dev/math/statuses/{sha}","languages_url":"https://api.github.com/repos/stan-dev/math/languages","stargazers_url":"https://api.github.com/repos/stan-dev/math/stargazers","contributors_url":"https://api.github.com/repos/stan-dev/math/contributors","subscribers_url":"https://api.github.com/repos/stan-dev/math/subscribers","subscription_url":"https://api.github.com/repos/stan-dev/math/subscription","commits_url":"https://api.github.com/repos/stan-dev/math/commits{/sha}","git_commits_url":"https://api.github.com/repos/stan-dev/math/git/commits{/sha}","comments_url":"https://api.github.com/repos/stan-dev/math/comments{/number}","issue_comment_url":"https://api.github.com/repos/stan-dev/math/issues/comments{/number}","contents_url":"https://api.github.com/repos/stan-dev/math/contents/{+path}","compare_url":"https://api.github.com/repos/stan-dev/math/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stan-dev/math/merges","archive_url":"https://api.github.com/repos/stan-dev/math/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stan-dev/math/downloads","issues_url":"https://api.github.com/repos/stan-dev/math/issues{/number}","pulls_url":"https://api.github.com/repos/stan-dev/math/pulls{/number}","milestones_url":"https://api.github.com/repos/stan-dev/math/milestones{/number}","notifications_url":"https://api.github.com/repos/stan-dev/math/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stan-dev/math/labels{/name}","releases_url":"https://api.github.com/repos/stan-dev/math/releases{/id}","deployments_url":"https://api.github.com/repos/stan-dev/math/deployments","created_at":"2015-07-01T18:40:54Z","updated_at":"2018-09-15T19:56:37Z","pushed_at":"2018-09-16T18:29:00Z","git_url":"git://github.com/stan-dev/math.git","ssh_url":"git@github.com:stan-dev/math.git","clone_url":"https://github.com/stan-dev/math.git","svn_url":"https://github.com/stan-dev/math","homepage":null,"size":260518,"stargazers_count":229,"watchers_count":229,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":211,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":79,"open_issues":211,"watchers":229,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/stan-dev/math/pulls/982"},"html":{"href":"https://github.com/stan-dev/math/pull/982"},"issue":{"href":"https://api.github.com/repos/stan-dev/math/issues/982"},"comments":{"href":"https://api.github.com/repos/stan-dev/math/issues/982/comments"},"review_comments":{"href":"https://api.github.com/repos/stan-dev/math/pulls/982/comments"},"review_comment":{"href":"https://api.github.com/repos/stan-dev/math/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stan-dev/math/pulls/982/commits"},"statuses":{"href":"https://api.github.com/repos/stan-dev/math/statuses/98eb55addec1dd94e9edb5e056e57c5753ae2341"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"drezap"}}