Replies: 2 comments
-
Hi! You could do something like this: self.compress_rows(|col| col.iter().map(|e| *e as u32).sum()) It’s basically the current implementation of |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello and thanks for all the good work on this crate!
Is there a preferred way to do a row_sum() cast to a different type? For example, if I have a 28x28 DMatrix of type u8, my row_sum() will overflow. I've been manually iterating over the matrix to get the row_sum() cast as a u32, but figured I'd ask if there was an easier way with the crate and some type of .into() syntax.
Beta Was this translation helpful? Give feedback.
All reactions