-
Notifications
You must be signed in to change notification settings - Fork 32
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
eigen: vectors written as rank-2 arrays #66
Comments
Thank you for reporting this. Before you fix something, did you try:
H5CPP already provides mechanism to save data into arbitrary shape.
indicates that Eigen3 follows suit with the majority of linalg systems, providing mechanism to differentiate rovectors and colvectors. Am I wrong? best:steve |
Yes, Eigen supports both colum-vectors and row-vectors in which case one of the compile-time (template) dimensions is 1 ( With this code (the second line):
I was able to save as 1D array :)
|
Great! This also get's simpler in the upcoming version... (erroneously the The first dataset is a rowvector, shape encoded; the second one is a rank 1 object -- no difference in performance; no 'standards' to adhere to :( As for the arrays, vectors and ...; I am working on providing a flexible mechanism to facilitate inter library format. then some other time get the crowd involved and see how to save data with good characteristics such that reading it back from other systems such as Julia, Python, R ... major C++ linalg, ... we get similar result. (just think about row major column major differences and their efficient mapping, or sparse matrix representations... ) To coordinate such thing and make it happen is a serious undertaking ... In any event, am having a C++ presentation for the Toronto user group -- most likely online -- : if you have interest in attending will give you a shout, and you are free to ask away. |
Rank functions are always returning a 2-tuple for Eigen, so even 1d structures are written as rank-2 arrays where one dimension is 1:
Just for the record. After the new type-deduction system is out, I can have a look to see how to fix it. I could fix it for the current one but tell me whether I am not wasting time.
The text was updated successfully, but these errors were encountered: