pyargs
Create keyword arguments for Python function
Description
kwa = pyargs(
creates one or
more keyword arguments to pass to a Python® function. A Python keyword argument is a value preceded by an identifier. Place
argKey,argValue
)pyargs
as the final input argument to a Python function. For
example:
py.print('a','b',pyargs('sep',','))
You cannot pass a keyword argument created by pyargs
as a key
argument to the MATLAB®
dictionary
function or as input to the keyMatch
function.
Examples
Input Arguments
Limitations
Do not combine
pyargs
andname=value
syntax when passing keyword arguments to Python functions.MATLAB does not support
name,value
syntax for passing keyword arguments to Python functions. Usename=value
syntax instead.
Alternative Functionality
You can pass Python keyword arguments using MATLAB
name=value
syntax. For more information, see Call Python complex Function Using Keyword Arguments.