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
How to construct a DMatrix from a slice of slices ? #873
Comments
Hi @pwnorbitals, I actually happen to be working on a procedural macro with the following syntax (MATLAB-like): // Statically allocated 2x3 matrix (SMatrix<_, 2, 3>)
let a = matrix![1, 2, 3;
4, 5, 6];
// Same, but DMatrix instead
let b = dmatrix![1, 2, 3;
4, 5, 6]; There will also be complementary Hopefully that suits your requirements? The main work is done, I'm just polishing, writing tests and documenting. However, I'll be quite busy over the next weeks so might still take some time until I can land the PR. |
Yes, that looks great ! Looking forwards to it, thank you very much for your answer. Is there anything one can do/contribute to help speed-up the process ? |
I think at the moment you might just have to be a little patient! Perhaps I can manage to put up a "work in progress" PR sooner rather than later though, in which case a review and/or feedback might be helpful |
@pwnorbitals: since you expressed desire to help with this, the functionality is now under review in #886. If you have any concerns with the current implementation you're welcome to address them there. |
I'd like to construct a DMatrix (or a Matrix which size is auto-deduced) with the following syntax. The reason I'd like the matrix size to be auto-deduced is that I'm lazy and don't want to count the size (can be very large numbers), and the reason I'd like to use this syntax is because it's (I think) easy to deduce the matrix size from it, and would be close to being to compatible with Numpy. Of course it can be a variation of this syntax.
Does this exist already ? If not, are there plans to implement it ?
Thank you for your consideration
PS : bonus points if you find the algorithm this matrix is from ;)
Code
The text was updated successfully, but these errors were encountered: