-
Notifications
You must be signed in to change notification settings - Fork 18
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
respect matrix_type
when coerced into matrix
#77
Conversation
R/matrix.R
Outdated
if (all(matrix <= .Machine$integer.max)) { | ||
storage.mode(matrix) <- "integer" | ||
} else { | ||
cli::cli_warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change this to a call to rlang::warn
? I don't think cli
is in the dependency list right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's well to do that, I missed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My working computer is not at hand, I'll do it tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No rush, I just wanted to get you back comments in a semi-timely manner :)
Thanks @Yunuuuu, this looks like a nice quality-of-life improvement. One additional request would be if you can add a basic test in
Then confirming everything is the same with |
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 |
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 |
Created on 2024-03-02 with reprex v2.0.2
~
~
~
~