Skip to content
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

matlab java based API adds extra dimension to arguments #2609

Open
joshStillerman opened this issue Sep 1, 2023 · 0 comments
Open

matlab java based API adds extra dimension to arguments #2609

joshStillerman opened this issue Sep 1, 2023 · 0 comments
Labels
bug An unexpected problem or unintended behavior

Comments

@joshStillerman
Copy link
Contributor

Affiliation
Massachusetts Institute of Technology

Version(s) Affected
This was probably broken when the code was redone 2 years ago:
f8cd674

Platform
Ubuntu
Matlab version R2020b.
hmm that commit is labeled Fix for .. R2021A

Describe the bug
When passing arguments to mdsvalue using the java based mdsplus API an extra empty dimension (as far as MDSplus is concerned is added to the array)

To Reproduce
Steps to reproduce the behavior:
```>> x = mdsvalue('decompile(`$)', transpose([1,2,3,4,5]))

x =

"[[1D0,2D0,3D0,4D0,5D0]]"

mdsUsePython()
x = mdsvalue('decompile(`$)', [1,2,3,4,5])

x =

'[[1D0], [2D0], [3D0], [4D0], [5D0]]'

x = mdsvalue('decompile(`$)', transpose([1,2,3,4,5]))

x =

'[1D0,2D0,3D0,4D0,5D0]'
**Expected behavior**
If I use the python based api and I transpose the input then I get the correct result.

mdsUsePython()
x = mdsvalue('decompile(`$)', [1,2,3,4,5])

x =

'[[1D0], [2D0], [3D0], [4D0], [5D0]]'

x = mdsvalue('decompile(`$)', transpose([1,2,3,4,5]))

x =

'[1D0,2D0,3D0,4D0,5D0]'

@joshStillerman joshStillerman added the bug An unexpected problem or unintended behavior label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant