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

Conversion from Numpy array to MATLAB double #6

Open
rebeccafair opened this issue Nov 21, 2022 · 0 comments
Open

Conversion from Numpy array to MATLAB double #6

rebeccafair opened this issue Nov 21, 2022 · 0 comments

Comments

@rebeccafair
Copy link
Member

Using Python 3.8 and MATLAB R2021b on IDAaaS (EL7) I get the following error when trying to convert from a Numpy to MATLAB array:
image

Whereas using Python 3.8 and MATLAB R2021b on my local Windows machine it works fine, and the way the Numpy array is represented seems to be completely different:
image

It seems we can't just tell from the MATLAB version whether double will work or not. There is an alternative py.array.array('d', x) which seems to work, but I don't know how slow it is. We should probably do a try/catch and only if double doesn't work try the other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant