We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://groups.google.com/forum/#!topic/casadi-users/56qNv_JaLHw
f427f24
The text was updated successfully, but these errors were encountered:
The implementation should have used recursive calls. It's more maintainable.
Sorry, something went wrong.
Something like:
MX MX::diagcat(const vector<MX>& x) { // Quick return if empty or single element if (x.empty()) return MX(); if (x.size()==1) return x.front(); // Call recursively if any 0-by-0 matrices if (has_empty(x, true)) return diagcat(trim_empty(x, true)); // Create diagcat node return x.front()->get_diagcat(x); }
More from forum:
>>> horzcat(SX([]), SX([1,2])) SX( [[00, 1], [00, 2]]) >>> horzcat(MX([]), MX([1,2])) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/marco/.local/lib/python2.7/site-packages/casadi/casadi.py", line 467, in horzcat def horzcat(*args): return _horzcat(args) File "/home/marco/.local/lib/python2.7/site-packages/casadi/casadi.py", line 18924, in _horzcat return _casadi._horzcat(*args) RuntimeError: .../casadi/core/mx.cpp:932: Assertion "ne[i].size1()==ne[0].size1()" failed: horzcat dimension mismatch x[1]:2x1 and x[0]: 0x1. >>> horzcat(DM([]), DM([1,2])) DM( [[00, 1], [00, 2]]) >>> horzcat(DM([]), IM([1,2])) IM( [[00, 1], ``
Still an issue for 3.6
jgillis
No branches or pull requests
https://groups.google.com/forum/#!topic/casadi-users/56qNv_JaLHw
f427f24
The text was updated successfully, but these errors were encountered: