-
Notifications
You must be signed in to change notification settings - Fork 37
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
An Matrix can be incorrectly expanded into an Array #1228
Comments
If we debug print the type of each element in --- a/inst/private/python_ipc_native.m
+++ b/inst/private/python_ipc_native.m
@@ -122,7 +122,9 @@ function [A, info] = python_ipc_native(what, cmd, varargin)
' construct the corresponding Matrix.'
' Otherwise, construct the corresponding 2D array.'
' """'
- ' elts = itertools.chain.from_iterable(ls_of_ls)'
+ ' elts = list(itertools.chain.from_iterable(ls_of_ls))'
+ ' for elt in elts:'
+ ' dbout(type(elt))'
' if (dbg_no_array'
' or all(isinstance(elt, Expr) for elt in elts)):'
' return Matrix(ls_of_ls)' and run this snippet
We get the following output
which shows that |
My first thought was to improve our current Perhaps a better way is to try creating a |
From your previous checking, it looks like non-sym are sneaking in somewhere: this is why I do like "ask forgiveness not permission" in Python. That is:
|
traced this to a (but I think you're right about longer term doing a try: except: later) |
Fixed in ef9744d |
On my
subs
branch, this test is failing:I'm not concerned at the moment about that isequal test failing (that is a different issue).
If you look at
sympy(a)
we see:But this is incorrect: it should've greedily become a Matrix...
The text was updated successfully, but these errors were encountered: