libpymcr
A module to load a compiled Matlab ctf archive and run its functions in Python.
Science Score: 44.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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.8%) to scientific vocabulary
Repository
A module to load a compiled Matlab ctf archive and run its functions in Python.
Basic Info
- Host: GitHub
- Owner: pace-neutrons
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Size: 604 KB
Statistics
- Stars: 0
- Watchers: 4
- Forks: 3
- Open Issues: 5
- Releases: 11
Metadata Files
README.md
libpymcr
libpymcr is a Python module for loading a compiled Matlab ctf archive and running functions within it in Python.
Whilst there is an official Mathworks binding for Python, libpymcr provides a few benefits over the official package:
- It is compatible with versions of Python not supported by Matlab (e.g. 3.10, 3.11, 3.12). Moreover, the supported Python versions are not locked to the Matlab versions, unlike with the official packages.
- When converting data between Matlab and Python it avoids data copies where ever possible by wrapping the underlying arrays
in the target type (
numpyor MatlabmxArray). In the official bindings, a data copy is required when converting data from Python to Matlab (inputs to functions). - It provides a simpler syntax, and if you include the provided
call.mandcall_python.mexfiles in your compiled package, you will also be able to access Matlab objects transparently in Python, and pass Python callables to Matlab to evaluate (e.g. in a fitting routine).
Getting started
You can install the package using:
pip install libpymcr
You must create a compiled Matlab archive (ctf file) of your program using the
Matlab Compiler SDK toolbox,
using the mcc command:
mcc -W CTF:your_program_name -U mfile1 mfile2 mfile3
Then in Python, you can load this and call the Matlab functions with:
python
import libpymcr
m = libpymcr.Matlab('your_program_name.ctf')
m.mfile1()
The functions, mfile1, mfile2 etc. are exposed to Python can can be called as methods of the Matlab() object.
Owner
- Name: pace-neutrons
- Login: pace-neutrons
- Kind: organization
- Repositories: 25
- Profile: https://github.com/pace-neutrons
Citation (CITATION.cff)
cff-version: "1.1.0"
message: "If you have used libpymcr in your research, please cite it as below"
abstract: "libpymcr is a Python module for loading compiled Matlab ctf archives and running functions in it"
authors:
- family-names: "Fair"
given-names: "Rebecca L."
orcid: "https://orcid.org/0000-0002-0926-2942"
- family-names: "Le"
given-names: "Manh Duc"
orcid: "https://orcid.org/0000-0003-3012-6053"
- family-names: "Ward"
given-names: "Simon"
orcid: "https://orcid.org/0000-0001-7127-5763"
- family-names: "Tucker"
given-names: "Gregory S."
orcid: "https://orcid.org/0000-0002-2787-8054"
- family-names: "Seth"
given-names: "Mridul"
orcid: "https://orcid.org/0000-0002-0969-0437"
title: "libpymcr"
version: "0.2.1"
date-released: "2024-04-26"
license: "GPL-3.0-only"
repository: "https://github.com/pace-neutrons/libpymcr"
url: "https://github.com/pace-neutrons/libpymcr"
keywords:
- "Python"
- "Matlab"
GitHub Events
Total
- Create event: 5
- Issues event: 4
- Release event: 1
- Delete event: 4
- Issue comment event: 5
- Push event: 31
- Pull request event: 11
- Fork event: 1
Last Year
- Create event: 5
- Issues event: 4
- Release event: 1
- Delete event: 4
- Issue comment event: 5
- Push event: 31
- Pull request event: 11
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 18
- Total pull requests: 25
- Average time to close issues: 4 months
- Average time to close pull requests: 5 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.89
- Average comments per pull request: 0.32
- Merged pull requests: 21
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 12
- Average time to close issues: about 20 hours
- Average time to close pull requests: about 18 hours
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.17
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mducle (16)
- MridulS (1)
- g5t (1)
Pull Request Authors
- mducle (25)
- MridulS (2)
- g5t (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 456 last-month
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 10
- Total maintainers: 1
pypi.org: libpymcr
A module to allow Python to call functions from a compiled Matlab archive
- Homepage: https://github.com/pace-neutrons/libpymcr
- Documentation: https://libpymcr.readthedocs.io/
- License: GNU General Public License v3 or later (GPLv3+)
-
Latest release: 0.2.1
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/cache v1 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- mamba-org/provision-with-micromamba main composite
- matlab-actions/setup-matlab v1.2.4 composite
- pypa/cibuildwheel v2.12.0 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- numpy >=1.7.1
- actions/checkout v3 composite