Comments (5)
Hi @arnodelorme, the reason we use files is that for large data we'd run into transmission issues over the pipe.
from oct2py.
Ah, OK, but the code above is more of a buffer than a pipe. It is subject to out-of-memory errors, though. Still, I think for large arrays or structures, it could speed read/write up to 1000 compared to storing on HDD (spinning disks).
from oct2py.
You are welcome to explore it, I don't have the bandwidth anymore to do anything more than light maintenance on oct2py
.
from oct2py.
OK, thank you for taking, at least, the time to respond. I might do some tests and issue a pull request (would just be an option, not the default, which works quite well).
Another issue I have encountered is that data access is different from accessing the HDF5 data directly. An Octave structure such as var.('test')(3).('test2') =1 (or var.test(3).test2 = 1), if I load the HDF5, directly, and convert mat structures to dictionaries, I would get something similar in Python
var['test'][2]['test2']
However, in Oct2py, I would need to use
var['test']['test2'][2,0]
Is there a way to use Oct2py with the original scipy.io.matlab._mio5_params.mat_struct object instead of the Struct Oct2py object? I am maintaining a large open-source Octave-compatible MATLAB project (EEG analysis +300k downloads) and would like Python users to be able to call the MATLAB functions. However, I would also like to have Python-optimized routines and Python users to access the data structures in a way that is natural in Python. So ideally, the Python data structures would not rely on external tools (only dictionaries, lists, and numpy arrays). They would look more like solution 1 above than solution 2.
BTW, of all of the methods I have tried to interface MATLAB with Python, Oct2py is the best. MATLAB code compilation into Python is pathetic (structure conversion is not supported, you can only pass on numerical arrays -- and the MATLAB runtime engine is a beast compared to the Octave one).
from oct2py.
I might do some tests and issue a pull request (would just be an option, not the default, which works quite well).
Yes, I agree making it an option would be ideal.
Is there a way to use Oct2py with the original scipy.io.matlab._mio5_params.mat_struct object instead of the Struct Oct2py object?
This could be made an option as well I believe. The marshal/unmarshal logic was especially tricky, particularly around cells/structs.
from oct2py.
Related Issues (20)
- Run doesn't create new variables in the octave environment HOT 3
- Conflict with opencv HOT 5
- bracketed paste \x1b[?2004h issue HOT 3
- Memory Leak HOT 1
- Problem with calling function; too many outputs HOT 1
- When I use python multiprocessing to open multiple octave displays a timeou HOT 1
- Problem with matlab package folders?
- Thread pool executor leaves ghost-threads that fill up memory
- Calling function script takes 1.5 seconds HOT 1
- error: 'graphics_toolkit' undefined
- Error trying to import octave in Anaconda Spyder using "from oct2py import octave" HOT 8
- _exist function not removing special characters from response HOT 2
- Error on testing
- oc.exit() should kill octave-gui + --no-gui option HOT 11
- Any command on jupyter print `[?2004l` HOT 2
- Octave installed via flatpak is not found HOT 5
- Can't run actave in Python
- argument of type 'NoneType' is not iterable
- question about recursive function
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 oct2py.