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 | RSS feed

Download files

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

Source Distributions

oct2py-1.2.0.zip (331.4 kB view details)

Uploaded Source

oct2py-1.2.0.tar.gz (317.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

oct2py-1.2.0.win32-py3.3.exe (232.2 kB view details)

Uploaded Source

oct2py-1.2.0.win32-py3.2.exe (232.2 kB view details)

Uploaded Source

oct2py-1.2.0.win32-py2.7.exe (232.2 kB view details)

Uploaded Source

oct2py-1.2.0-py2.py3-none-any.whl (33.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file oct2py-1.2.0.zip.

File metadata

  • Download URL: oct2py-1.2.0.zip
  • Upload date:
  • Size: 331.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for oct2py-1.2.0.zip
Algorithm Hash digest
SHA256 6bb9f4c9a7327a071250f7c9aba993381bfc26476479fe1980e2b8afe5a8a58d
MD5 09baff19b76e747a9d879d30ead6b435
BLAKE2b-256 c557d55884ef5e104467d63e144a92471abb2a207828be7f872e9df04dcf4dd7

See more details on using hashes here.

File details

Details for the file oct2py-1.2.0.tar.gz.

File metadata

  • Download URL: oct2py-1.2.0.tar.gz
  • Upload date:
  • Size: 317.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for oct2py-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b1339e675a719c8913ebe0deb2fc457a56164a4640460c194af37a53c92d74a2
MD5 b59990fea7b6e376f09f2d50d5297b9a
BLAKE2b-256 737eb103bfb847f05c5672626e8278e8742e6c8d6b51fa0968343893d21cd48f

See more details on using hashes here.

File details

Details for the file oct2py-1.2.0.win32-py3.3.exe.

File metadata

File hashes

Hashes for oct2py-1.2.0.win32-py3.3.exe
Algorithm Hash digest
SHA256 acdc7d11b0fdf2a052a92cba6cdcf299b37dee3eeb2576595544444f5e5d74d5
MD5 a3f8b622ad05f602338c36aa41af40e3
BLAKE2b-256 65c1b0274c1e10a816ae7c01702b018a88ec981f686149c24d957d9109886ccd

See more details on using hashes here.

File details

Details for the file oct2py-1.2.0.win32-py3.2.exe.

File metadata

File hashes

Hashes for oct2py-1.2.0.win32-py3.2.exe
Algorithm Hash digest
SHA256 62d018578cc08d2b14e235ea28ac82205dc40f916d75bc5fffed9983052575dd
MD5 cf2a52f63a8189dfa18d8855d834e54d
BLAKE2b-256 c0e8771a4902582d933c71e02abf7107ef675a4a5f90efed33d63cb68b170429

See more details on using hashes here.

File details

Details for the file oct2py-1.2.0.win32-py2.7.exe.

File metadata

File hashes

Hashes for oct2py-1.2.0.win32-py2.7.exe
Algorithm Hash digest
SHA256 8a3e4c3b5bb7e2dff5a59296a15f1e3bcb863a9854fa4f969554ab91897416ac
MD5 d30e5e1374009ba6ce745ee07a85271f
BLAKE2b-256 df327ac7be2c6e7735997f99917d640e11fc621c6c503f663e9b929b32f67aad

See more details on using hashes here.

File details

Details for the file oct2py-1.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for oct2py-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8e140cf9cf21eb564ebbdf50329f5d603f5779112f7871f4df739525186d9a8b
MD5 44067c198ae87ddf7836e74596593fa2
BLAKE2b-256 b36f07c9757e91d9170771db75dd7b7b9a609241193c7839393eff6aa1d7d983

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page