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

bug for sequential transfer of same variable #40

Closed
mpollow opened this issue Jan 20, 2014 · 3 comments
Closed

bug for sequential transfer of same variable #40

mpollow opened this issue Jan 20, 2014 · 3 comments

Comments

@mpollow
Copy link
Contributor

mpollow commented Jan 20, 2014

The following lines are copied from a notebook console. Exporting fails if the same filename is used for differently shaped data. There is no error message, but still the old data is in memory in python, see the example below. The HDF5 data on file gets updated correctly, so the bug must occur when importing to python.

By the way, what also looks like a bug is actually fine: The dimension in Matlab in the example is (4,3) and in Python (3,4). As Matlab stores the data column wise in memory and Python does so row wise, the data does not have to be resorted and is thus probably faster.

Here the example:

import pymatbridge as pymat
ip = get_ipython()
pymat.load_ipython_extension(ip)

%%matlab -o c
c = rand(4,3);

%%matlab -o c
c = rand(4,4);

c.shape
(3, 4)

@arokem
Copy link
Owner

arokem commented Jan 22, 2014

Considering that this might be a communication issue, let's revisit this
after merging the new ZMQ communication stuff.

On Mon, Jan 20, 2014 at 2:22 PM, Chilichiller notifications@github.comwrote:

The following lines are copied from a notebook console. Exporting fails if
the same filename is used for differently shaped data. There is no error
message, but still the old data is in memory in python, see the example
below. The HDF5 data on file gets updated correctly, so the bug must occur
when importing to python.

By the way, what also looks like a bug is actually fine: The dimension in
Matlab in the example is (4,3) and in Python (3,4). As Matlab stores the
data column wise in memory and Python does so row wise, the data does not
have to be resorted and is thus probably faster.

Here the example:

import pymatbridge as pymat
ip = get_ipython()
pymat.load_ipython_extension(ip)

%%matlab -o c
c = rand(4,3);

%%matlab -o c
c = rand(4,4);

c.shape
(3, 4)


Reply to this email directly or view it on GitHubhttps://github.com//issues/40
.

@mpollow
Copy link
Contributor Author

mpollow commented Jan 23, 2014

Sounds good to me. Let me know when the new version is merged.
Thanks for your effort.

Am 22.01.2014 um 23:51 schrieb Ariel Rokem notifications@github.com:

Considering that this might be a communication issue, let's revisit this
after merging the new ZMQ communication stuff.

On Mon, Jan 20, 2014 at 2:22 PM, Chilichiller notifications@github.comwrote:

The following lines are copied from a notebook console. Exporting fails if
the same filename is used for differently shaped data. There is no error
message, but still the old data is in memory in python, see the example
below. The HDF5 data on file gets updated correctly, so the bug must occur
when importing to python.

By the way, what also looks like a bug is actually fine: The dimension in
Matlab in the example is (4,3) and in Python (3,4). As Matlab stores the
data column wise in memory and Python does so row wise, the data does not
have to be resorted and is thus probably faster.

Here the example:

import pymatbridge as pymat
ip = get_ipython()
pymat.load_ipython_extension(ip)

%%matlab -o c
c = rand(4,3);

%%matlab -o c
c = rand(4,4);

c.shape
(3, 4)


Reply to this email directly or view it on GitHubhttps://github.com//issues/40
.


Reply to this email directly or view it on GitHub.

@arokem
Copy link
Owner

arokem commented Nov 8, 2014

OK - sorry for how long this has taken. This seems resolved now

@arokem arokem closed this as completed Nov 8, 2014
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

2 participants