Closed Yunuuuu closed 8 months ago
Thanks @Yunuuuu, this looks like a nice quality-of-life improvement. One additional request would be if you can add a basic test in test-matrix_utils.R
that just confirms that the typing works properly on demo 3x5 matrices? (The generate_dense_matrix
helper function will probably be useful to you there). The cases I'd want covered are:
Then confirming everything is the same with expect_identical
which is type-sensitive
Hi, @bnprks. I have added the unit test. Another opinion, do you think should we keep the matrix data type when coercing a dense matrix into the IterableMatrix
by adding a new method instead of coercing into dgCMatrix
firstly?
Hi @Yunuuuu, sorry for the delay getting back to this. I've just looked through your changes, made a couple of final edits to tests, and merged back into main.
Your idea about adding a specific method to convert directly from a dense matrix
to IterableMatrix
is good. I'm not sure how commonly BPCells users will want to do that, but I'd be happy to review a separate pull request if you want to implement it.
Created on 2024-03-02 with reprex v2.0.2 ~
~
~
~