When MATLAB® functions return output arguments, the MATLAB Engine API for Python® converts the data into equivalent Python data types.
MATLAB Output Argument
Type — | Resulting Python Data Type |
---|---|
|
|
|
|
Complex (any numeric type) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Structure |
|
MATLAB handle object (such as the |
MATLAB returns
a reference to a |
MATLAB value object (such as the
| Opaque object. You can pass a value object to a MATLAB function but you cannot create or modify it. |
MATLAB Output Argument
Type — | Resulting Python Data Type |
---|---|
Numeric array |
|
|
|
|
|
|
|
Row or column cell array |
|
The MATLAB Engine API for Python does not support these MATLAB data types.
char
array (M
-by-N
)
Cell array (M
-by-N
)
Sparse array
Structure array
Non-MATLAB objects (such as Java® objects)