Comments (3)
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.
def read_cell_array(self):
"""deserialize MATLAB cell array"""
n_dims = self.read_value()
shape = self.read_value(count=n_dims)
n_elem = int(np.prod(shape))
result = [self.read_blob(n_bytes=self.read_value()) for _ in range(n_elem)]
if n_elem != len(np.ravel(result, order="F")): # if not all elements are scalars. shouldn't work for ragged arrays
shape = (-1,) + tuple(shape[1:n_dims])
return (
self.squeeze(
np.array(result).reshape(shape, order="F"), convert_to_scalar=False
)
).view(MatCell)
from datajoint-python.
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.
from datajoint-python.
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).
In matlab its an 1×2 cell array {10×5370×10 single} {10×5370×10 single}.
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
from datajoint-python.
Related Issues (20)
- S3 external files OS Error HOT 1
- Error during distributed computing populaution HOT 3
- Name external store files with primary key when downloaded HOT 1
- dj.diagram not working after update to 14.1 HOT 4
- Broken image/diagram in docs: design/diagrams/#example HOT 3
- `.parts` not always returning parts HOT 2
- dj.set_password does not work in MySQL 8
- Cannot follow developer set up instructions HOT 2
- Choose custom download location for attach@store objects HOT 2
- Error on cascade delete in MySQL 8 HOT 3
- `current_timestamp()` not treated as sql literal HOT 1
- Pytest `test_datetime_serialization_speed` occasionally fails
- datajoint.conn and datajoint.Connection.__init__ fail when using Python 3.11 and MySQL 5.7
- Underscores in table names yield false positives for `get_master` HOT 2
- File Management System HOT 1
- OperationalError: (1046, 'No database selected') when querying json attribute
- make that table "delete" returns the count of deleted objects HOT 2
- Convenience functions to insert / fetch when an attach field is in table definition HOT 1
- Add documentation for altering populated pipelines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datajoint-python.