Skip to main content

A package to run Octave functions and scripts in the Python interpreter!

Project description

run-octave

License: MIT Linkedin

Run Octave functions and scripts in the Python interpreter

Requirements

Examples

from run_octave import RunOctave
import numpy as np

# Create the RunOctave object and explicitly add the path to octave-gui.exe
octave = RunOctave(octave_path='C:/Octave/Octave-5.2.0/mingw64/bin/octave-gui.exe')

A = np.array([[ 2, 0, 1],
              [-1, 1, 0],
              [-1, 1, 0],
              [-3, 3, 0]])

# Start Testing
m, n = octave.run(nargout=2, target='size', args=(A,))
print(m, n)

N = octave.run(nargout=1, target='vecnorm', args=(A, 2, 2))
print(N)

# Inserting expressions directly
X = octave.run(nargout=1, target='ones(4, 3) * 255;')
print(X)

Installation

Simply install run-octave from PyPI

pip install run-octave

Project details


Download files

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

Source Distribution

run_octave-1.0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

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