Main Content

Limitations toPython金宝app

Features Not Supported in MATLAB®

Closing the Python®interpreter while running MATLAB with in-process execution mode.

Saving (serializing) Python objects into a MAT-file.

Interactive Python help (callingpy.helpwithout input arguments).

py.inputandpy.raw_input(version 2.7).

Accessing static properties of a Python class.

MATLABisafunction does not recognize virtual inheritance.

MATLAB class inheritance from a Python class.

Customized (dynamic) attribute access.

Nested Python classes.

Modules that start MATLAB in a separate process, for example, themultiprocessingmodule.

Modules that readsys.argv, the command-line arguments passed to a Python script, for example,Tkinter.

Dynamically generated Python classes, for example,collections.namedtuplein CPython 2.7.

Dynamically attaching new object attributes. Instead, usepy.setattr.

Class names or other identifiers starting with an underscore (_) character. Instead, use the Pythonpy.getattrandpy.setattrfunctions.

Python modules generated by theMATLAB Compiler SDK™product.

Python code using Cocoa (AppKit) for user interfaces onmacOSplatforms.

The size of variables passed between Python and MATLAB is limited to 2 GB when you call a Python function out-of-process. This limit applies to the data plus supporting information passed between the processes.

UnsupportedMATLABTypes

These MATLAB types are not supported in Python.

  • Multidimensionalcharorcellarrays

  • Structure arrays

  • Complex, scalar integers or arrays

  • Sparse arrays

  • categorical,
    table,
    containers.Map,
    datetimetypes

  • MATLAB objects

  • meta.class(py.class)

Related Topics