-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bug: PULL-PUSH-PULL 1D Column vector will convert into 1D Row Vector #221
Comments
After investigating, the problem located on m.eval("x = cell(4,1); x(:) = 1.0;")
m.eval('size(x)')
# ans =
# 4 1
x = m.pull('x')
print(np.shape(x))
# (4,)
m.push('x', x)
m.eval('size(x)')
# ans =
# 1 4 |
A fix would be force 1D Cell push as 2D Cell push or fix it while octave reading Edit: If we look at how
|
Should we change it to atleast 2D or add special case for Column vector? Lines 224 to 226 in e8ebd99
|
I think special casing Column vector makes sense. Adding a few tests that ensure we preserve the shape for We should be able to round trip these cells without losing the shape, that was an oversight on my part. |
This is working just fine:
But, this will convert into
(1,n)
The text was updated successfully, but these errors were encountered: