{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/207","labels_url":"https://api.github.com/repos/stan-dev/rstan/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/rstan/issues/207/comments","events_url":"https://api.github.com/repos/stan-dev/rstan/issues/207/events","html_url":"https://github.com/stan-dev/rstan/pull/207","id":105735142,"number":207,"title":"Feature/csr extract","user":{"login":"bgoodri","id":3386282,"avatar_url":"https://avatars.githubusercontent.com/u/3386282?v=3","gravatar_id":"","url":"https://api.github.com/users/bgoodri","html_url":"https://github.com/bgoodri","followers_url":"https://api.github.com/users/bgoodri/followers","following_url":"https://api.github.com/users/bgoodri/following{/other_user}","gists_url":"https://api.github.com/users/bgoodri/gists{/gist_id}","starred_url":"https://api.github.com/users/bgoodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgoodri/subscriptions","organizations_url":"https://api.github.com/users/bgoodri/orgs","repos_url":"https://api.github.com/users/bgoodri/repos","events_url":"https://api.github.com/users/bgoodri/events{/privacy}","received_events_url":"https://api.github.com/users/bgoodri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-10T05:34:15Z","updated_at":"2015-09-15T02:07:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/stan-dev/rstan/pulls/207","html_url":"https://github.com/stan-dev/rstan/pull/207","diff_url":"https://github.com/stan-dev/rstan/pull/207.diff","patch_url":"https://github.com/stan-dev/rstan/pull/207.patch"},"body":"not working yet"},"comment":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/comments/140253666","html_url":"https://github.com/stan-dev/rstan/pull/207#issuecomment-140253666","issue_url":"https://api.github.com/repos/stan-dev/rstan/issues/207","id":140253666,"user":{"login":"sakrejda","id":508137,"avatar_url":"https://avatars.githubusercontent.com/u/508137?v=3","gravatar_id":"","url":"https://api.github.com/users/sakrejda","html_url":"https://github.com/sakrejda","followers_url":"https://api.github.com/users/sakrejda/followers","following_url":"https://api.github.com/users/sakrejda/following{/other_user}","gists_url":"https://api.github.com/users/sakrejda/gists{/gist_id}","starred_url":"https://api.github.com/users/sakrejda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakrejda/subscriptions","organizations_url":"https://api.github.com/users/sakrejda/orgs","repos_url":"https://api.github.com/users/sakrejda/repos","events_url":"https://api.github.com/users/sakrejda/events{/privacy}","received_events_url":"https://api.github.com/users/sakrejda/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T02:07:08Z","updated_at":"2015-09-15T02:07:08Z","body":"I'm not seeing why it wouldn't work at the moment but it's late. It's way\ntoo easy to get turned around with this.  It might be easier if you lay out\nthe interface you want for rstan, along with the tests you want to have\npassing and the I just make them pass. Interested in doing that? Krzysztof\nOn Sep 14, 2015 9:00 PM, \"bgoodri\" <notifications@github.com> wrote:\n>\n> I think I get it, but I'm kind of wondering what would be the most useful\nthing for a user. Currently, I have this test, which is based on the Stan\nmanual and is passing:\n>\n> test_extract_sparse_parts <- function() {\n>   A <- rbind(\n>     c(19L, 27L,  0L,  0L),\n>     c( 0L,  0L,  0L,  0L),\n>     c( 0L,  0L,  0L, 52L),\n>     c(81L,  0L, 95L, 33L)\n>   )\n>   w <- c(19, 27, 52, 81, 95, 33)\n>   v <- c(1, 2, 4, 1, 3, 4)\n>   u <- c(1, 3, 3, 4, 7)\n>   parts <- rstan::extract_sparse_parts(A, type = \"CSC\")\n>   checkEquals(parts$w, w)\n>   checkEquals(parts$v, v)\n>   checkEquals(parts$u, u)\n>\n>   parts <- rstan::extract_sparse_parts(t(A * 1.0))\n>   checkEquals(parts$w, w)\n>   checkEquals(parts$v, v)\n>   checkEquals(parts$u, u)\n>\n>   parts <- rstan::extract_sparse_parts(Matrix::t(Matrix::Matrix(A)))\n>   checkEquals(parts$w, w)\n>   checkEquals(parts$v, v)\n>   checkEquals(parts$u, u)\n> }\n>\n> But if I had that A matrix and wanted to use the CSR representation in a\nStan program to use with csr_matrix_times_vector, I think I would expect\nextract_sparse_parts(A, type = \"CSR\") to just work, but it would yield the\nwrong thing.\n\n>\n> —\n> Reply to this email directly or view it on GitHub.\n"}}