-
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
Read an empty cell array blob fails #1056
Comments
Thank you for submitting this @Alvalunasan. I think I understand the problem. |
Hi @dimitri-yatsenko Thank you very much for your help |
Hi @dimitri-yatsenko , a note that this is not restricted to old Matlabs-- it was happening with a recent Matlab , and on data from August 2023. Maybe newer data too, I haven't yet checked on newer data. Would it be appropriate to merge Alvaro's patch? |
@Alvalunasan updates his patch and suggests replacing lines 495-499 with
|
ok, will incorporate asap. We are starting to work on a new release. Thanks. |
See next coment |
@dimitri-yatsenko , @carlosbrody New corner case for the function (Cell Matrix reading, instead of only nx1 vectors):
|
Excellent. I am traveling until next week and will work on this when I return. Thank you so much for this solution. |
I understand this was resolved and traced to a 32-bit compilation of |
I just reviewed the blob code and found that we have a setting to switch to 32-bit length econding. You can turn it on by doing dj.blob.use_32bit_dims = True This should fix your issue. Please try and let me know. |
Hi Dimitri, sorry for the late response, |
@Alvalunasan We are in a good place to fix it if you can provide a good way to reproduce this. We are working toward releasing DataJoint Python 1.0 by the end of the year and would like to close most issues. We are not focusing on MATLAB compatibility as much, going deeper on Python instead. You are a very important users, so we can fix it if you can help us reproduce it without using MATLAB. |
Bug Report
Description
Reading an empty cell array inserted with mym MATLAB fails to be read in Datajoint python
Reproducibility
I have a corner case for reading some special. blobs in Datajoint Python when these are stored with mym Matlab:
Here is the type of blob stored in the DB and read on Matlab:
As you can see, what is stored in a part of the blob is a 3x1 cell array composed of empty items:
When trying to read this data in Python, I got this error:
I have “patched” the blob.py code read_cell_array function with:
Just to add the case that the size of the array is zero (numpy array size is 0 if it’s filled with empty arrays)
Probably not the cleanest way to do it.
Expected Behavior
To get something similar to this when reading this kind of blobs:
The text was updated successfully, but these errors were encountered: