Limitations to Python Support
The Python® interface in MATLAB® enables you to access Python libraries, execute Python statements, and pass data between MATLAB and Python. However, the Python interface does not currently support the following functionality.
| Functionality Not Supported in MATLAB |
|---|
Closing the Python interpreter while running MATLAB with in-process execution mode |
Saving (serializing) Python objects into a MAT file |
Passing Python objects to process workers in a parallel pool |
Passing Python objects or keyword arguments created by |
Calling Python help ( |
Accessing static properties of a Python class |
Using the MATLAB
|
Inheriting a MATLAB class from a Python class |
Customizing (dynamic) attribute access |
Nesting Python classes |
Using Python modules (such as the |
Using Python modules (such as |
Dynamically generating Python classes |
Dynamically attaching new object attributes. Instead, use the Python
|
Using class names or other identifiers that start with an underscore
( |
Using Python modules generated by MATLAB Compiler SDK™ |
Using Python code that uses Cocoa (AppKit) for interfaces on macOS platforms |
Passing variables that exceed 2 GB between Python and MATLAB when calling a Python function out-of-process. This limit applies to the data plus supporting information passed between the processes. |
Modifying Python classes defined using |
Converting types based on Python type hints when using |
Unsupported MATLAB Types
These MATLAB types are not supported in Python:
Sparse arrays
Nonscalar
structarrayscategoricalcontainers.MapMATLAB objects
matlab.metadata.Class(py.class)