-
Notifications
You must be signed in to change notification settings - Fork 85
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
Cell array of arrays of doubles cannot be fetched in python, only in matlab #1098
Comments
Thanks for the report, @renanmcosta. Typically the MATLAB cell array gets properly packed and unpacked. We have not encountered the error that you reported. We will investigate further and get back to you. |
For now I've managed to fetch with the temporary fix below. I don't think it's very robust, but I'm copying it here in case it's informative.
|
Greetings, I have just encountered the same problem, and temp fix seems to work (Thanks a lot @renanmcosta) Temporary fix returns an array but with shape = (537000, 2). type(temp_fixed) --> datajoint.blob.MatCell Am I able to retrieve the original dimensions or this is a robustness problem of the temporary fix? Thanks in advance |
Hi @Paschas, could you update us on this? We are looking to resolve this. |
The temp fix is responsible for the shape differences there. Lately, I have been using a simpler fix, which shouldn't collapse any dimensions. This is one should always work, though it's possible that it can lead to awkward array nesting at times.
|
Let's see if we can incorporate this in this coming release. |
Greetings @dimitri-yatsenko & @renanmcosta Without @renanmcosta's fixes I used to get 2 types of error:
or
The fix_cell_array_fetch() is working but I would be cautious (Thanks again @renanmcosta ) In different but similar occasion arrays had the correct shape but data were shuffled, eventually a changed the following:
|
We just found a new case where the latest approach I posted above still raises a ValueError, e.g.:
|
Bug Report
Description
Fetching fails in python when each entry for a given attribute (defined in matlab) is a cell array, and each element of the cell array is an array of doubles. Fetching in matlab works as expected.
Reproducibility
Windows, Python 3.9.13, DataJoint 0.13.8
Steps:
epoch_pos_range=null : blob # list of y position ranges corresponding to n epochs in epoch_list, (e.g., {[y_on y_off],[y_on y_off]} for epoch_list {'epoch1','epoch2'})
Error stack:
The text was updated successfully, but these errors were encountered: