Skip to main content

mat2py mean to be drop-in replacement of Matlab by wrapping Numpy/Scipy/... packages.

Project description

mat2py

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License Coverage Report

mat2py mean to be drop-in replacement of Matlab by wrapping Numpy/Scipy/... packages.

For instance usage, try the Fake Matlab in Browser here. Please note:

  • You might need quite long time to initilaize the console for the first time. Checkout the browser console or network traffic for progress.
  • Only one line matlab expression supported, for example [1; 2; 3]*[1 2 3].
  • Only few Matlab core functions supported for now.

The final goal is to create a serverless, Matlab compatiable console completely in end-users' browser.

First Steps

Installation

python3 -m pip install -U mat2py

or install with Poetry

poetry add mat2py

Install the translator mh_python if needed

python3 -m pip install -U mh-python

Try the example demo_fft

# download the one already converted and formatted
wget https://raw.githubusercontent.com/mat2py/mat2py/main/tests/test_example/demo_fft.py

# or convert it yourself
echo "wget https://raw.githubusercontent.com/mat2py/miss_hit/matlab2numpy/tests/mat2np/demo_fft.m"
echo "mh_python --python-alongside --format demo_fft.m"

# run it...
python3 demo_fft.py

You can also try out the online translator by modifiy the example or put your own code.

For Developer

Initialize your code

  1. Clone mat2py:
git clone https://github.com/mat2py/mat2py 
  1. If you don't have Poetry installed run:
make poetry-download
source ~/.poetry/env
  1. Initialize poetry and install pre-commit hooks:
make install
make pre-commit-install
  1. Run the lint to check:
make lint

ToDO

  • A serverless web service for run .m/.py code inside browser
  • Complete set of MATLAB® Basic Functions
  • Copy-on-Write beheviour
  • A cleaner class hierarchy
  • Enable lint(mypy, UT, etc.)

📈 Releases

You can see the list of available releases on the GitHub Releases page.

We follow Semantic Versions specification.

We use Release Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.

🛡 License

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

📃 Citation

@misc{mat2py,
  author = {mat2py},
  title = {mat2py mean to be drop-in replacement of Matlab by wrapping Numpy/Scipy/... packages.},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/mat2py/mat2py}}
}

Credits 🚀 Your next Python package needs a bleeding-edge project structure.

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

mat2py-0.0.14.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

mat2py-0.0.14-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file mat2py-0.0.14.tar.gz.

File metadata

  • Download URL: mat2py-0.0.14.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mat2py-0.0.14.tar.gz
Algorithm Hash digest
SHA256 baf435b459898c6813f2c8ece5ba21af9f17eaf755f58aaa6a3aa37e73170826
MD5 a4328a91241e6d6a0a7750b50d345922
BLAKE2b-256 d87d5bfadf1d8a400e08278ba79dc73229e7f63d33451e4de645afdd7e0b5be3

See more details on using hashes here.

File details

Details for the file mat2py-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: mat2py-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mat2py-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 51feb9ce65c22ea81be4cb041a9ce78e86a3c06b1d6aa9d755e131cc6176351b
MD5 e0d35c3e8b217edd0deb74a951586e0c
BLAKE2b-256 0ec34917f62e5e013dae0d5cfed269fdcb6c30bf4017cdb8be20926a1471d619

See more details on using hashes here.

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