Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r] SOMASparseNDArray$read_sparse_matrix: set dims on the returned sparseMatrix #1110

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

mlin
Copy link
Member

@mlin mlin commented Mar 15, 2023

#1099

Quick hit here to set the sparseMatrix dims for non-iterated reads only. I have WIP on iterated reads, but ran into a few complications, so I'd like to keep working on that in additional PR(s) to come.

@mlin mlin marked this pull request as ready for review March 15, 2023 05:54
@mlin mlin requested review from eddelbuettel and johnkerl and removed request for eddelbuettel March 15, 2023 05:54
@mlin mlin added the r-api label Mar 15, 2023
Matrix::sparseMatrix(i = 1 + as.numeric(tbl$GetColumnByName("soma_dim_0")),
j = 1 + as.numeric(tbl$GetColumnByName("soma_dim_1")),
x = as.numeric(tbl$GetColumnByName("soma_data")),
dims = as.integer(self$shape()), repr = repr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good use of shape() now that we have it!

Copy link
Contributor

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@johnkerl johnkerl changed the title [r] SOMASparseNDArray$read_sparse_matrix: set dims on the returned sparseMatrix [r] SOMASparseNDArray$read_sparse_matrix: set dims on the returned sparseMatrix Mar 15, 2023
@mlin mlin merged commit ac6dcce into main Mar 15, 2023
@mlin mlin deleted the mlin/r-sparseMatrix-dims branch March 15, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants