PythonPackage Integration
Integrate compiled MATLAB®functions into Python®applications
MATLAB Compiler SDK™provides Python methods to initializeMATLAB Runtime, invoke compiled MATLAB functions, and manage data that is passed between the Python code and MATLAB Runtime.
For a list of compatible Python versions, seeMATLABSupported Interfaces to Other Languages.
You cannot package MATLAB code that uses the MATLAB Python interface.
Functions
Topics
Requirements and Highlights
- Differences Between MATLAB Engine API for Python and MATLAB Compiler SDK
List differences between MATLAB Engine API for Python andMATLAB Compiler SDKfor Python - Initialize MATLAB Runtime
InitializeMATLAB Runtimefor use with Python applications.
Create and Integrate with Python
- Generate a Python Package and Build a Python Application
Create a Python package in MATLAB and implement it with sample Python driver code. - Import Compiled Python Packages
Import compiled Python packages containing MATLAB functions into Python
Sample Applications
- Invoke a Packaged MATLAB Function
Ways to invoke a compiled MATLAB function in Python - Invoke a Compiled MATLAB Function Asynchronously
异步调用compiled MATLAB function that uses the Python object.
Data Conversion
- Pass Data Between MATLAB and Python
Learn how MATLAB converts data between Python and MATLAB data types. - matlab Python模块
Use thematlab
Python module to create MATLAB numeric types as Python variables so that MATLAB arrays can be passed between Python and MATLAB. - Use MATLAB Arrays in Python
Example illustrating how to use MATLAB data types in a Python application