oct2py

Run M Files from Python - GNU Octave to Python bridge

https://github.com/blink1073/oct2py

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 27 committers (7.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords from Contributors

mesh interpretability parallel hacking package-management conda data-profilers datacleaner optimizer pipeline-testing
Last synced: 6 months ago · JSON representation ·

Repository

Run M Files from Python - GNU Octave to Python bridge

Basic Info
Statistics
  • Stars: 270
  • Watchers: 12
  • Forks: 52
  • Open Issues: 47
  • Releases: 19
Created over 13 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.rst

Oct2Py: Python to GNU Octave Bridge
===================================

.. image:: https://badge.fury.io/py/oct2py.png/
    :target: http://badge.fury.io/py/oct2py

.. image:: https://codecov.io/github/blink1073/oct2py/coverage.svg?branch=main
  :target: https://codecov.io/github/blink1073/oct2py?branch=main

.. image:: http://pepy.tech/badge/oct2py
   :target: http://pepy.tech/project/oct2py
   :alt: PyPi Download stats

Oct2Py allows you 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:

.. code-block:: pycon

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

To run .m function, you need to explicitly add the path to .m file using:

.. code-block:: pycon

    >>> from oct2py import octave
    >>> # to add a folder use:
    >>> octave.addpath("/path/to/directory")  # doctest: +SKIP
    >>> # to add folder with all subfolder in it use:
    >>> octave.addpath(octave.genpath("/path/to/directory"))  # doctest: +SKIP
    >>> # to run the .m file :
    >>> octave.run("fileName.m")  # doctest: +SKIP

To get the output of .m file after setting the path, use:

.. code-block:: pycon

    >>> import numpy as np
    >>> from oct2py import octave
    >>> x = np.array([[1, 2], [3, 4]], dtype=float)
    >>> # use nout='max_nout' to automatically choose max possible nout
    >>> octave.addpath("./example")  # doctest: +SKIP
    >>> out, oclass = octave.roundtrip(x, nout=2)  # doctest: +SKIP
    >>> import pprint  # doctest: +SKIP
    >>> pprint.pprint([x, x.dtype, out, oclass, out.dtype])  # doctest: +SKIP
    [array([[1., 2.],
            [3., 4.]]),
        dtype('float64'),
        array([[1., 2.],
            [3., 4.]]),
        'double',
        dtype('
      

Owner

  • Name: Steven Silvester
  • Login: blink1073
  • Kind: user
  • Company: MongoDB

Citation (CITATION.cff)

cff-version: 1.2.0
title: "Oct2Py: Python to GNU Octave Bridge"
message: "If you use this software, please cite it as below."
authors:
  - family-names: "Silvester"
    given-names: "Steven"
keywords:
  - "Python"
  - "Octave"
  - "Oct2Py"
repository-code: "https://github.com/blink1073/oct2py"
license: "MIT"

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 6
  • Watch event: 11
  • Issue comment event: 6
  • Push event: 7
  • Pull request review event: 3
  • Pull request event: 4
  • Fork event: 1
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 6
  • Watch event: 11
  • Issue comment event: 6
  • Push event: 7
  • Pull request review event: 3
  • Pull request event: 4
  • Fork event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,221
  • Total Committers: 27
  • Avg Commits per committer: 45.222
  • Development Distribution Score (DDS): 0.089
Past Year
  • Commits: 9
  • Committers: 3
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.444
Top Committers
Name Email Commits
Steven Silvester s****r@i****g 1,112
pre-commit-ci[bot] 6****] 42
Muhammad Yasirroni 4****i 11
GitHub Action 4****] 10
Steven Silvester s****e@a****m 8
Kostis Anagnostopoulos a****s@g****m 4
silvester@silvester-custo.pn.at.cox.net s****r@s****t 3
silvester@silvester-acer s****r@s****r 3
Test l****n@u****) 3
Aditya P. Apte a****e@g****m 3
dependabot[bot] 4****] 3
Stephan Hoyer s****r@g****m 2
Jason K. Moore m****s@g****m 2
cel c****o@g****m 2
Andrew Bolster me@a****o 1
Jens Nielsen j****n@g****m 1
Jonathan Suever s****r@g****m 1
Jordi Gutiérrez Hermoso j****h@o****g 1
Josue Ortega s****t@g****m 1
Manuel Osdoba m****a@t****e 1
MinRK b****k@g****m 1
zimoun s****r@g****m 1
silvester s****r@s****) 1
Thomas Kluyver t****l@g****m 1
nikolaz111 n****1@g****m 1
pooya Games 4****s 1
tylerbjackson t****n@g****m 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 51
  • Total pull requests: 98
  • Average time to close issues: 6 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 40
  • Total pull request authors: 5
  • Average comments per issue: 2.61
  • Average comments per pull request: 0.31
  • Merged pull requests: 89
  • Bot issues: 0
  • Bot pull requests: 50
Past Year
  • Issues: 11
  • Pull requests: 5
  • Average time to close issues: about 4 hours
  • Average time to close pull requests: about 1 month
  • Issue authors: 10
  • Pull request authors: 3
  • Average comments per issue: 0.36
  • Average comments per pull request: 0.6
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • yasirroni (8)
  • 17Reset (2)
  • WiseroOrb (2)
  • arnodelorme (2)
  • locastre (2)
  • snheffer (1)
  • prowe12 (1)
  • ppalvar (1)
  • mludwini (1)
  • jcollignon (1)
  • prbuen (1)
  • ankostis (1)
  • MarkMa1990 (1)
  • Mathieu1972 (1)
  • marcoistasy (1)
Pull Request Authors
  • blink1073 (43)
  • pre-commit-ci[bot] (43)
  • dependabot[bot] (11)
  • yasirroni (10)
  • tylerbjackson (2)
Top Labels
Issue Labels
question (11) bug (6) enhancement (1)
Pull Request Labels
maintenance (79) dependencies (11) documentation (7) bug (6) enhancement (6) python (6) github_actions (3)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 9,146 last-month
  • Total docker downloads: 179
  • Total dependent packages: 14
    (may contain duplicates)
  • Total dependent repositories: 101
    (may contain duplicates)
  • Total versions: 170
  • Total maintainers: 2
pypi.org: oct2py

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

  • Versions: 75
  • Dependent Packages: 14
  • Dependent Repositories: 94
  • Downloads: 9,146 Last month
  • Docker Downloads: 179
Rankings
Dependent packages count: 1.1%
Dependent repos count: 1.5%
Average: 2.3%
Docker downloads count: 3.0%
Downloads: 3.5%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/blink1073/oct2py
  • Versions: 66
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 3.4%
Forks count: 3.4%
Average: 6.8%
Dependent packages count: 9.6%
Dependent repos count: 10.8%
Last synced: 6 months ago
conda-forge.org: oct2py
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 7
Rankings
Dependent repos count: 12.9%
Stargazers count: 24.8%
Forks count: 25.3%
Average: 28.7%
Dependent packages count: 51.6%
Last synced: 6 months ago

Dependencies

.github/workflows/enforce-label.yml actions
  • jupyterlab/maintainer-tools/.github/actions/enforce-label v1 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • jupyter-server/jupyter_releaser/.github/actions/check-release v2 composite
  • jupyterlab/maintainer-tools/.github/actions/base-setup v1 composite
  • jupyterlab/maintainer-tools/.github/actions/check-links v1 composite
  • re-actors/alls-green release/v1 composite
pyproject.toml pypi
  • numpy >=1.12
  • octave_kernel >= 0.34.0
  • scipy >=0.17