

This is similar to Octave's Java interface.īecause classdef is used, some of the following known issues are specifically related to Octave's classdef implementation, which is still a relatively new work in progress. The pyobject class overrides functions such as class and isa so it appears as if each Python type is represented by a corresponding distinct class in Octave, but in reality they are all of the same type. which contains a persistent reference to the corresponding Python object. More specifically, any Python object is represented by an object of type pyobject. Python objects are implemented as Octave classdef objects. This section documents some known problems or limitations of the Python calling interface, usually due to a limitation of the Octave language itself or a bug in Octave that needs some attention. In most cases, these are created automatically. The class wraps arbitrary Python objects so they can be accessed and manipulated from within Octave.

G_cell = cell ( G ) # G converted to a cell G_struct = struct ( G ) # G converted to a struct When the keys are something else there is the option to use `repr` to create the fields of the Octave's struct, e.g.Ĭode: Conversion of Python's dict to structure This works only when all the keys for the dict are strings.

For that we have decided to load a Python's dict as a structure. The conversion of Python's dictionary (dict) is not unique. We are using doxygen for the documentation. The current development needs to be documented. Communication takes place on the Octave maintainers mailing list. Project development is ongoing among a small group of developers. Load and save Python objects to Octave data files using the standard load/save commands.Operate on Python objects using standard Octave arithmetic and logical operators.Perform slice indexing on lists and other sequence objects using parentheses indexing syntax.Some features that have not yet been implemented, but have been planned for, include: Perform key indexing on dicts and other mapping objects using curly bracket indexing syntax.Perform element indexing on lists and other sequence objects using curly bracket indexing syntax.Assign any Python function or callable object to an Octave variable, and call it as if it were a function handle.Assign any Python object to an Octave variable, view its properties, and invoke methods on it.Automatically convert basic Octave and Python types seamlessly between the two operating environments.Import and call any Python module or function from the Octave interpreter.At a high level, the features and capabilities of Octave's Python interface allow a user to:
