Skip to main content

Python to GNU Octave bridge --> run m-files from python.

Project description

https://badge.fury.io/py/oct2py.png/ https://pypip.in/d/oct2py/badge.png https://coveralls.io/repos/blink1073/oct2py/badge.png?branch=master

Oct2Py is a means to seamlessly call M-files and Octave functions from Python. It manages the Octave session for you, sharing data behind the scenes using MAT files. Usage is as simple as:

>>> oc = oct2py.Oct2Py()
>>> x = oc.zeros(3,3)
>>> print x, x.dtype
[[ 0.  0.  0.]
 [ 0.  0.  0.]
 [ 0.  0.  0.]] float64
...

If you want to run legacy m-files, do not have MATLAB(TM), and do not fully trust a code translator, this is your library.

Features

  • Supports all Octave datatypes and most Python datatypes and Numpy dtypes.
  • Provides OctaveMagic for IPython, including inline plotting in notebooks.
  • Supports cell arrays and structs with arbitrary nesting.
  • Supports sparse matrices.
  • Builds methods on the fly linked to Octave commands (e.g. zeros above).
  • Nargout is automatically inferred by the number of return variables.
  • Thread-safety: each Oct2Py object uses an independent Octave session.
  • Can be used as a context manager.
  • Supports Unicode characters.

Installation

You must have GNU Octave installed and in your PATH. On Windows, the easiest way to get Octave is to use an installer from Sourceforge. On Linux, it should be available from your package manager. Additionally, you must have the Numpy and Scipy libraries installed.

To install Oct2Py, simply:

$ pip install oct2py

Or, if you absolutely must:

$ easy_install oct2py

Documentation

Documentation is available online.

For version information, see the Revision History.

Project details


Release history Release notifications

History Node

4.0.6

History Node

4.0.5

History Node

4.0.4

History Node

4.0.3

History Node

4.0.2

History Node

4.0.1

History Node

4.0.0

History Node

4.0rc1

History Node

3.9.2

History Node

3.9.1

History Node

3.9.0

History Node

3.8.1

History Node

3.8.0

History Node

3.7.0

History Node

3.6.5

History Node

3.6.4

History Node

3.6.3

History Node

3.6.2

History Node

3.6.1

History Node

3.6.0

History Node

3.5.10

History Node

3.5.9

History Node

3.5.8

History Node

3.5.7

History Node

3.5.6

History Node

3.5.5

History Node

3.5.4

History Node

3.5.3

History Node

3.5.2

History Node

3.5.1

History Node

3.5.0

History Node

3.4.1

History Node

3.4.0

History Node

3.3.3

History Node

3.3.2

History Node

3.3.1

History Node

3.3.0

History Node

3.2.0

History Node

3.1.0

History Node

3.0.0

History Node

2.4.2

History Node

2.4.0

History Node

2.3.0

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.6.0

History Node

1.5.0

History Node

1.4.0

History Node

1.3.0

This version
History Node

1.2.0

History Node

1.1.1

History Node

1.1.0

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
oct2py-1.2.0-py2.py3-none-any.whl (33.8 kB) Copy SHA256 hash SHA256 Wheel 2.7 Dec 14, 2013
oct2py-1.2.0.tar.gz (317.7 kB) Copy SHA256 hash SHA256 Source None Dec 14, 2013
oct2py-1.2.0.win32-py2.7.exe (232.2 kB) Copy SHA256 hash SHA256 Windows Installer 2.7 Dec 14, 2013
oct2py-1.2.0.win32-py3.2.exe (232.2 kB) Copy SHA256 hash SHA256 Windows Installer 3.2 Dec 14, 2013
oct2py-1.2.0.win32-py3.3.exe (232.2 kB) Copy SHA256 hash SHA256 Windows Installer 3.3 Dec 14, 2013
oct2py-1.2.0.zip (331.4 kB) Copy SHA256 hash SHA256 Source None Dec 14, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page